maxLength static method
Implementation
static FormFieldValidator<String> maxLength(int length, [String? message]) {
return (String? value) {
if ((value?.length ?? 0) > length) {
return message ?? 'This field must be less than $length characters';
}
return null;
};
}