notEmpty<T, E> static method

Rule<Iterable<T>, E> notEmpty<T, E>({
  1. required E error,
})

Validates that the collection is not empty.

CollectionRules.notEmpty(error: 'Cannot be empty')

Implementation

static Rule<Iterable<T>, E> notEmpty<T, E>({required E error}) =>
    PredicateRule(
      predicate: (value) => value.isNotEmpty,
      error: error,
    );