-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include postal code example per country/subdivision #127
Comments
I think this would be a great addition as this will show an example as to what was expected by the validator |
I need to resolve #147 first because if we give up on subdivision-level postal code validation, then we don't need postal code examples on that level either. |
@BenWalters |
Just ran into this with the following values from El Salvador:
Both failed validation, but both are "shorthand" for the postal code, and in both cases it gave the vague "Postal code field is not in the right format." message. |
Problem/Motivation
There are many scenarios in which the postal code validation return ambiguous error messages. It might be useful to provide some additional context through a valid example. Google provides a list of valid postal code examples under the
zipex
property. As a first step to improve postal code validation, we would need to include this property in the addressing resources.Example
What's involved:
generate_address_data.php
to includezipex
on both country and subdivision levelpostalCodeExample
toAddressFormat
classRelated: #31
The text was updated successfully, but these errors were encountered: