minLength<E> static method

Rule<String, E> minLength<E>(
  1. int min, {
  2. required E error,
})

Validates that the string has at least min characters.

StringRules.minLength(8, error: 'Must be at least 8 characters')

Implementation

static Rule<String, E> minLength<E>(int min, {required E error}) =>
    PredicateRule(predicate: (value) => value.length >= min, error: error);