vbpupil/uk-postcode-validation

UK Postcode Validation

Installs: 109

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/vbpupil/uk-postcode-validation

1.0 2019-02-11 12:12 UTC

This package is auto-updated.

Last update: 2025-10-12 07:39:13 UTC


README

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