How do you perform address validation? [closed]

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).

Leave a Comment