unique<T, E> static method
Validates that the collection has no duplicate items.
CollectionRules.unique(error: 'Duplicate items not allowed')
Implementation
static Rule<Iterable<T>, E> unique<T, E>({required E error}) => PredicateRule(
predicate: (value) => value.toSet().length == value.length,
error: error,
);