Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.5

Request #10904 APO/FPO addresses
Submitted: 2007-05-01 16:16 UTC
From: jausions Assigned:
Status: Open Package: Validate_US (version 0.5.2)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 16 - 6 = ?

 
 [2007-05-01 16:16 UTC] jausions (Philippe Jausions)
Description: ------------ How should we handle special cases of AF/AA/AE military "states" for the region() method? One easy solution would be to add the "AF", "AA", "AE" as supported "regions" in the region() method, but at the same time they are not actual regions, just proxy values. Should we add a postalRegion() to all Validate_* country-based validation packages that would handle such validation?

Comments

 [2007-06-01 15:13 UTC] timmyg (Tim Gallagher)
There are a bunch of extra abbreviations also Extras -------- AMERICAN SAMOA AS DISTRICT OF COLUMBIA DC FEDERATED STATES OF MICRONESIA FM GUAM GU MARSHALL ISLANDS MH NORTHERN MARIANA ISLANDS MP PALAU PW PUERTO RICO PR VIRGIN ISLANDS VI Military "State" Abbreviation ------------------------------ Armed Forces Africa AE Armed Forces Americas (except Canada) AA Armed Forces Canada AE Armed Forces Europe AE Armed Forces Middle East AE Armed Forces Pacific AP I think these should just be added to the region function - I also think we should include the full version of the region name - especially for states - so that if we're checking "Wyoming" it returns true since it is a valid state. what do you think?
 [2009-03-09 23:25 UTC] rasmo2003 (Tyler Rasmussen)
I think the abbreviations recognized by the USPS should all be included. http://www.usps.com/ncsc/lookups/usps_abbreviations.html Maybe an option for validating against Military "States" i.e. function region($region, $military = false) could be included, as even the USPS separates them into their own special group, but it would be simpler to just validate all. To timmyg - Based on how postalCodeByRegion works, it would be foolish to have a function that validates "Iowa" unless we add "Iowa" to the cases in postalCodeByRegion. I think it would be easier to have a function that validates region_name and maybe a function that can take a valid region_name and return the state_code (or vice versa).