maxLength static method
Implementation
static FormFieldValidator<List> maxLength(int length, [String? message]) {
return (List? value) {
if (value != null && value.length > length) {
return message ?? 'This field must have at most $length items';
}
return null;
};
}