maxLength static method
Validates the maximum length of input.
Implementation
static String? Function(String) maxLength(int length, {String? message}) {
final schema = string().max(
length,
message: message ?? 'Must be at most $length characters.',
);
return (value) => _validate(schema, value);
}