PHP Class IsoCodes\Uknin

Inheritance: implements isocodes\IsoCodeInterface
Show file Open project: ronanguilloux/isocodes Class Usage Examples

Public Methods

Method Description
validate ( string $uknin ) : boolean UK's National Insurance Number validator Also known as NINO.

Method Details

validate() public static method

UK's National Insurance Number validator Also known as NINO.
See also: http://www.hmrc.gov.uk/manuals/nimmanual/nim39110.htm
See also: http://stackoverflow.com/a/17929051/490589
Author: ronan.guilloux regexp must check "/^[A-CEGHJ-NOPR-TW-Z]{1}[A-CEGHJ-NPR-TW-Z]{1}[0-9]{6}[A-D\s]{1}/i"; regexp must NOT check "/(^GB)|(^BG)|(^NK)|(^KN)|(^TN)|(^NT)|(^ZZ).+/i";
public static validate ( string $uknin ) : boolean
$uknin string
return boolean