2017 © Pedro PelĂĄez
 

library personal-id-validator

Library to validate personal IDs of different countries.

image

cyrkulewski/personal-id-validator

Library to validate personal IDs of different countries.

  • Wednesday, September 28, 2016
  • by martyshka
  • Repository
  • 1 Watchers
  • 1 Stars
  • 858 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 27 % Grown

The README.md

Personal ID Validator

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Library to validate personal IDs of different countries. Most of the countries in the world assign certain ID to each citizen. This library helps to validate it. One just need to pass ID and country short-name (in ISO 3166-1 alpha-2 standard) to the validator., (*2)

Supported countries (in alphabetical order):, (*3)

Country code Country name Personal ID name
DE Germany Steueridentifikationsnummer
DK Denmark CPR-nummer
FI Finland HETU
FR France Numéro de sécurité sociale (INSEE)
PL Poland PESEL
SE Sweden Personnumer

Install

Via Composer, (*4)

``` bash $ composer require cyrkulewski/personal-id-validator, (*5)


## Usage There is one public function used for validation. It will return boolean. One need to pass ID to check and country code. ``` php $validator->validate('ID', 'COUNTRY');

``` php use cyrkulewski\PIdV\Dictionary\CountryDictionary; use cyrkulewski\PIdV\PIdValidator;, (*6)

$validator = new PIdValidator(); $validator->validate('197704190011', CountryDictionary::SWEDEN); // true $validator->validate('311280-888Y', CountryDictionary::FINLAND); // true $validator->validate('abcdef', CountryDictionary::DENMARK); // false $validator->validate('197704190011', 'NON-SUPPORTED-COUNTRY'); // false, (*7)


## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash $ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*8)

Security

If you discover any security related issues, please email cyrkulewski@gmail.com instead of using the issue tracker., (*9)

Credits

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions

28/09 2016

dev-master

9999999-dev https://github.com/martyshka/pidv

Library to validate personal IDs of different countries.

  Sources   Download

MIT

The Requires

  • php ~5.5|~7.0

 

The Development Requires

aleksander cyrkulewski personal id validator