minLength static method
Implementation
static FormFieldValidator<String> minLength(
int length, {
bool cleanMask = false,
String? message,
}) {
return (String? value) {
String? _value = value;
if (cleanMask && _value.isNotBlank) {
_value = StringUtils.cleanMask(value!);
}
if ((value?.length ?? 0) < length) {
return message ?? 'This field must have at least $length characters';
}
return null;
};
}