country static method
FormFieldValidator that requires the field's value to be a valid country.
Parameters:
countryWhitelistThe list of allowed countries.countryBlacklistThe list of disallowed countries.errorTextThe error message when the country is invalid.checkNullOrEmptyWhether 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;