Is it even possible to perform address (physical, not e-mail) validation? It seems like the sheer number of address formats, even in the US alone, would make this a fairly difficult task. On the other hand it seems like a task that would be necessary for several business requirements.
An address can be verified in one of two ways: upfront, when a user searches for an address that is not correct or complete, or by cleansing, parsing, matching and formatting data in a database against reference postal data. Bulk address validation serves businesses that want to verify addresses.
The US postal service compares the provided address against their address database to identify possible matches. If the postal service finds an exact match in their database, they will return a response that the address is valid and properly formatted. And just like that, your address is validated.
The address verification system encountered an error when attempting to validate the address, usually due to a missing or invalid value, or combination of values, in the City, State, and Postal Code fields. For example, the City field may be blank, or the postal code is in an incorrect format for the ship-to country.
If you receive the error "The address you entered could not be verified against the USPS database", please check the following: In most cases there is an entry problem with the address. Check for correct spelling, numbers, ordinals (NE, SW, etc), and titles like Avenue or Street.
Here's a free and sort of "outside the box" way to do it. Not 100% perfect, but it should reject blatantly non-existent addresses.
Submit the entire address to Google's geocoding web service. This service attempts to return the exact coordinates of the location you feed it, i.e. latitude and longitude.
In my experience if the address is invalid you will get a result of 602 from the service. There's definitely a possibility of false positives or false negatives, but used in conjunction with other consistency checks it could be useful.
(Yahoo's geocoding web service, on the other hand, will return the coordinates of the center of the town if the town exists but the rest of the address is bogus. Potentially useful as long as you pay close attention to the "precision" field in the result).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With