Validate uk postcodes in php

Nominet requires that the uk postcode be in a valid format, this is a routine I wrote many years ago but still works today.

Code after the break

I used RegExpBuddy to help validate the latest update to the regexp. Very handy bit of software.

Be the first to comment

Leave a Reply

Your email address will not be published.


*