alpha<E> static method

Rule<String, E> alpha<E>({
  1. required E error,
})

Validates that the string contains only letters.

StringRules.alpha(error: 'Must contain only letters')

Implementation

static Rule<String, E> alpha<E>({required E error}) => PredicateRule(
      predicate: (value) => _alphaRegex.hasMatch(value),
      error: error,
    );