maxLength<E> static method
Validates that the string has at most max characters.
StringRules.maxLength(100, error: 'Must be at most 100 characters')
Implementation
static Rule<String, E> maxLength<E>(int max, {required E error}) =>
PredicateRule(predicate: (value) => value.length <= max, error: error);