lastName static method

FormFieldValidator<String> lastName({
  1. RegExp? regex,
  2. List<String> lastNameWhitelist = const <String>[],
  3. List<String> lastNameBlacklist = const <String>[],
  4. String? errorText,
  5. bool checkNullOrEmpty = true,
})

FormFieldValidator that requires the field's value to be a valid last name.

Parameters:

  • regex The regex pattern to match.
  • lastNameWhitelist The list of allowed last names.
  • lastNameBlacklist The list of disallowed last names.
  • errorText The error message when the last name is invalid.
  • checkNullOrEmpty Whether to check for null or empty values.

Implementation

static FormFieldValidator<String> lastName({
  RegExp? regex,
  List<String> lastNameWhitelist = const <String>[],
  List<String> lastNameBlacklist = const <String>[],
  String? errorText,
  bool checkNullOrEmpty = true,
}) => LastNameValidator(
  regex: regex,
  lastNameWhitelist: lastNameWhitelist,
  lastNameBlacklist: lastNameBlacklist,
  errorText: errorText,
  checkNullOrEmpty: checkNullOrEmpty,
).validate;