maxLength static method
Fails when the value is longer than max characters.
Implementation
static PrismValidator maxLength(int max, [String? message]) =>
(value) => (value ?? '').length > max
? (message ?? 'Must be at most $max characters')
: null;