minLength method
FormFieldValidator
that requires the length of the field's value to be
greater than or equal to the provided minimum length.
Implementation
static FormFieldValidator minLength(
num minLength, {
String errorText,
}) {
return (val) {
if (val != null && val.length < minLength) {
return errorText ??
"Value must have a length greater than or equal to $minLength";
}
};
}