validate method
Implementation
Result validate(dynamic value, {bool exists = true}) {
if ((value == null && isNullable && exists) || (value == null && isOptional && !exists)) {
return Result.valid(value);
}
final result = validator(value);
if (result is Future<Result>) {
throw AsyncValidatorException();
}
return result;
}