I can't think of any module that does what you want. If you decide to modularise your code and release it, do please remember that address formats vary widely from one place to another, and assuming that all addresses are of the form address/city/state/zip is incorrect: for example, in the UK there is no state field, what you have as a single line for "address" we would call "street address" (the whole thing is the address) and it may be split over several lines), and your "city" field may also be split over two (or more) lines. In general, the only structure you can assume is address/country, where address is free-form text over several lines. You can, of course, have country-specific code for picking that free-form text apart once you know what the country is.
Obviously you're only interested in US addresses, which is fine, but to make your code more useful to others (and hence make them more likely to give you bug fixes and cool new features) it would be a good idea to define a common interface which knows how to dispatch to country-specific modules, and to put the US-specific code in one of those that you bundle with the generic front-end.
In reply to Re: Suggestions requested: module to standardize postal address components?
by DrHyde
in thread Suggestions requested: module to standardize postal address components?
by atcroft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |