Validating postcodes

Posted by / 06-Feb-2018 22:25

If the parameter is a valid postcode, the function returns it correctly formatted - i.e.in uppercase and with a space between the inward part and the output parts. I want to use these postcode to map the distance from a central point but before I can do that I need to put them into a valid format and filter out any blanks or incomplete postcodes.

This is the best and most comprehensive postcode validator that I have seen. Share also what is correct postcode format – lad2025 Sep 11 '15 at Are those UK postcodes?I'm not sure trying to validate them down in the database is a good idea.By Mike Lewis If your database contains UK address data, it's especially important that the postcodes are correctly stored.British postcodes do much more than speed the mail.

validating postcodes-56validating postcodes-38validating postcodes-10

You can formulate your Regex for the LIKE in this format...

One thought on “validating postcodes”

  1. Sexual assault service providers have highly trained staff that can offer assistance in moments of crisis as well as resources for ongoing support related to sexual violence.