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