email static method

ValidationRule email({
  1. String message = 'Invalid email format',
})

Implementation

static ValidationRule email({String message = 'Invalid email format'}) {
  return ValidationRule(
    (value) => RegExp(_emailRegex).hasMatch(value ?? '') ? null : '',
    message,
  );
}