country static method
FormFieldValidator that requires the field's value to be a valid country.
Parameters:
countryWhitelist
The list of allowed countries.countryBlacklist
The list of disallowed countries.errorText
The error message when the country is invalid.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<String> country({
List<String> countryWhitelist = const <String>[],
List<String> countryBlacklist = const <String>[],
String? errorText,
bool checkNullOrEmpty = true,
}) => CountryValidator(
countryWhitelist: countryWhitelist,
countryBlacklist: countryBlacklist,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;