maxLength<T, E> static method
Validates that the collection has at most max items.
CollectionRules.maxLength(10, error: 'Maximum 10 items')
Implementation
static Rule<Iterable<T>, E> maxLength<T, E>(int max, {required E error}) =>
PredicateRule(
predicate: (value) => value.length <= max,
error: error,
);