withErrorMessage method
Overrides the error message of the current validator.
Implementation
FormFieldValidator<T> withErrorMessage(String errorMessage) {
return (T? valueCandidate) {
final String? result = this(valueCandidate);
return result != null ? errorMessage : null;
};
}