all<T> static method
when valid
- every validator return null
Implementation
static FormeValidator<T> all<T>(List<FormeValidator<T>> validators,
{String errorText = ''}) {
return (f, T v) {
for (final FormeValidator<T> validator in validators) {
final String? resultText = validator(f, v);
if (resultText != null) {
return resultText == '' ? errorText : resultText;
}
}
return null;
};
}