zipCode static method
FormFieldValidator that requires the field's value to be a valid zip code.
Parameters:
errorTextThe error message when the zip code is invalid.checkNullOrEmptyWhether to check for null or empty values.
Implementation
static FormFieldValidator<String> zipCode({
String? errorText,
bool checkNullOrEmpty = true,
}) => ZipCodeValidator(
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;