mpijierro/identity-php

检查多种西班牙文文件的验证。

1.0.0 2019-04-12 11:25 UTC

This package is auto-updated.

Last update: 2024-09-29 05:29:30 UTC


README

Scrutinizer Code Quality Build Status Code Intelligence Status

IdentityPhp

检查NIF、CIF、NIE和IBAN账户的西班牙文有效文件。此包是PHP的简化版本,其来源是针对Laravel编写的包(https://github.com/mpijierro/identity)。

安装

使用以下命令安装最新版本:

$ composer require "mpijierro/identity-php"

用法

即插即用,实例化后即可使用。

<?php
use MPijierro\IdentityPhp\Identity;

$identity = new Identity();

$isValid = $identity->isValidCIF('fooBar'); //Example, check if CIF document is valid
//...
//...

所有方法返回true或false。

许可证

IdentityPhp遵循MIT许可证 - 详细信息请参阅LICENSE文件

致谢

NIF、CIF和NIE的原代码在以下链接中

http://www.michublog.com/informatica/8-funciones-para-la-validacion-de-formularios-con-expresiones-regulares

感谢:globalcitizen/php-iban的原代码

https://github.com/globalcitizen/php-iban

感谢:http://intervia.com的原代码用于验证NNSS

http://intervia.com/doc/validar-numeros-de-la-seguridad-social/

感谢antoiba86 (https://github.com/antoiba86)。他在原始的Laravel包中添加了IBAN检查。