maxLength static method
Validates maximum character length.
Implementation
static FormFieldValidator<String> maxLength(int max, [String? message]) =>
(value) => (value != null && value.length > max)
? (message ?? 'Must be no more than $max characters')
: null;