firstName static method
FormFieldValidator that requires the field's value to be a valid first name.
Parameters:
regexThe regex pattern to match.firstNameWhitelistThe list of allowed first names.firstNameBlacklistThe list of disallowed first names.errorTextThe error message when the first name is invalid.checkNullOrEmptyWhether to check for null or empty values.
Implementation
static FormFieldValidator<String> firstName({
RegExp? regex,
List<String> firstNameWhitelist = const <String>[],
List<String> firstNameBlacklist = const <String>[],
String? errorText,
bool checkNullOrEmpty = true,
}) => FirstNameValidator(
regex: regex,
firstNameWhitelist: firstNameWhitelist,
firstNameBlacklist: firstNameBlacklist,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;