maxLength static method
Implementation
static Validator maxLength(int maxLength, [String? text]) {
return (String? value) {
if ((value?.length ?? 0) > maxLength) {
return text ?? "Maximum of $minLength characters allowed.";
}
return null;
};
}