Think Global, Act Local
That's what they tell you, however during all my time as I developer I've always seen big companies like Google, Microsoft, Oracle and so do validations in a localized manner: they know which country I'm from so they will try to validate my phone number, postal code and other details such as bank account numbers with the proper validation methods for my country. Yesterday I signed up for Google checkout and they even showed me some examples of postal code formats in my country!
So my question is, how do they do this? I know that they have thousands of employees but I find it hard to believe that they all had to reinvent the well. There are countless validations methods for the US but what about the rest of the world? I've not yet seen a single open source decent library (apart from a very incomplete and outdated PEAR attempt) to perform validations on various common aspects of countries such as:
- Civil ID
- Tax ID
- SSN (Social Security Number)
- BBAN (Basic Bank Account Number)
- Fax, Phone and Mobile Numbers
- Postal / Zip Codes
- License Plates
- Banknote Serial Numbers
- and so on...
Is there any well hidden resource that I'm unaware of?