lastName static method
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;