Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 793 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 793 Bytes

Quality Assurance

PHP 5.6 Build Status License: MIT

UK Postcode Validation

UK postcode validation tool used to determine that a string given is a valid UK Postcode. The object then returned contains the following:

  1. Type - area classification
  2. Head - first section of the postcode
  3. Tail - last section of the postcode

How to use?

$p = new Postode('SW1A 1AA');
$p->getType(); # returns string UK_MAINLAND
$p->getHead(); # returns string SW1A
$p->getTail(); # returns string 1AA