commerceguys / addressing

A PHP addressing library, powered by CLDR and Google's address data.
MIT License
922 stars 135 forks source link

Include postal code example #128

Open Etroid opened 5 years ago

Etroid commented 5 years ago

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.

Closes #127

bojanz commented 5 years ago

This is a good idea. However, it looks incomplete. The generate script also creates a postal_code_example for subdivisions, but the subdivision json files weren't updated, and neither was Subdivision.php

Etroid commented 5 years ago

Included subdivisions resources and added postal_code_example to both AddressFormat and SubDivision