validateFirst<T> function
Runs validators in order and returns the first error, or null when all accept the value.
Implementation
TFormFieldValidator<T> validateFirst<T>(Iterable<TFormFieldValidator<T>> validators) => (value) {
for (final validator in validators) {
final error = validator(value);
if (error != null) return error;
}
return null;
};