any<T, E> static method
Validates that at least one item matches the predicate.
CollectionRules.any((role) => role == 'admin', error: 'Need admin role')
Implementation
static Rule<Iterable<T>, E> any<T, E>(
bool Function(T) predicate, {
required E error,
}) =>
PredicateRule(
predicate: (value) => value.any(predicate),
error: error,
);