lengthRange<T, E> static method
Validates that the collection length is within min and max (inclusive).
CollectionRules.lengthRange(1, 5, error: 'Must have 1-5 items')
Implementation
static Rule<Iterable<T>, E> lengthRange<T, E>(
int min,
int max, {
required E error,
}) =>
PredicateRule(
predicate: (value) => value.length >= min && value.length <= max,
error: error,
);