governmentplates/uk-national-insurance-validator

简单的英国国家保险号码验证器

1.0.0 2022-09-25 15:27 UTC

This package is auto-updated.

Last update: 2024-09-05 17:32:20 UTC


README

这是一个简单快速的英国国家保险(N.I.)号码验证器。

License Dependents

安装

composer require governmentplates/uk-national-insurance-validator

要求:PHP 7 或更高版本。

用法

<?php

use NIValidator\NationalInsurance;

$ni = new NationalInsurance('QQ123456C');
$ni->validate();

//validate() returns true if a given number is valid, or false otherwise.

它是如何验证 N.I. 号码的?

这个简单的验证器遵循英国 N.I. 号码格式的逻辑规则,如 HMRC 保险手册中所示HMRC Insurance Manual

这是安全的吗?这会泄露我的或我的用户的 N.I. 号码吗?

请随意检查源代码(位于 src/ 目录中)。

许可

GNU 通用公共许可证 v3.0。