alphabetical static method

FormFieldValidator<String> alphabetical({
  1. RegExp? regex,
  2. String? errorText,
  3. bool checkNullOrEmpty = true,
})

FormFieldValidator that requires the field's value to contain only alphabetical characters.

Parameters:

  • regex The regex pattern to match.
  • errorText The error message when the value is not alphabetical.
  • checkNullOrEmpty Whether to check for null or empty values.

This regex matches only alphabetical characters.

  • It allows both uppercase and lowercase letters.

Examples: abcdef, XYZ

Implementation

static FormFieldValidator<String> alphabetical({
  RegExp? regex,
  String? errorText,
  bool checkNullOrEmpty = true,
}) => AlphabeticalValidator(
  regex: regex,
  errorText: errorText,
  checkNullOrEmpty: checkNullOrEmpty,
).validate;