minLength static method
Implementation
static Validator minLength(int minLength, [String? text]) {
return (String? value) {
if ((value?.length ?? 0) < minLength) {
return text ?? "Must contain a minimum of $minLength characters.";
}
return null;
};
}