validateValue method
Validates the value.
Returns null
if the value is valid, otherwise an error message.
Call validate() instead of this method when using the validator.
Implementation
@override
String? validateValue(T? valueCandidate) {
for (final FormFieldValidator<T> validator in validators) {
final String? validatorResult = validator.call(valueCandidate);
if (validatorResult != null) {
return validatorResult;
}
}
return null;
}