Validating postcodes

Posted by / 03-Dec-2017 11:27

Validating postcodes

Even if you never need to check UK postcodes, we hope you'll find the technique useful for other tasks.Copyright 2013 Lovell Fuller Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.Do not use code, components or techniques unless you are satisfied that they will work correctly in your applications. If your application processes UK postcodes, you'll need an effective way of validating them.

A code might pass this test but still not be a genuine postcode.However, UK postcodes follow strict formatting rules.If you don't have access to the PAF, you can at least check that the postcodes in your application follow these rules.The official Postcode Address File (PAF) contains around 27 million codes, and is subject to strict copyright and licensing controls.The only practical way to access it is by purchasing specialised address management software, and this is inevitably an expensive option.

validating postcodes-69validating postcodes-80validating postcodes-52

One thought on “validating postcodes”