lastName static method
FormFieldValidator that requires the field's value to be a valid last name.
Parameters:
regexThe regex pattern to match.lastNameWhitelistThe list of allowed last names.lastNameBlacklistThe list of disallowed last names.errorTextThe error message when the last name is invalid.checkNullOrEmptyWhether 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;