email<E> static method

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

Validates that the string is a valid email format.

Uses a standard email regex pattern.

StringRules.email(error: 'Invalid email format')

Implementation

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