notEmpty<K, V, E> static method

Rule<Map<K, V>, E> notEmpty<K, V, E>({
  1. required E error,
})

Validates that the map is not empty.

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

Implementation

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