Download the PHP package jontsa/national-identification-number without Composer
On this page you can find all versions of the php package jontsa/national-identification-number. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jontsa/national-identification-number
More information about jontsa/national-identification-number
Files in jontsa/national-identification-number
Package national-identification-number
Short Description Parse national identification numbers.
License MIT
Homepage https://github.com/Jontsa/national-identification-number
Informations about the package national-identification-number
PHP classes to parse, validate and format personal identification numbers
This package can be used to parse, validate and format national personal identification numbers. In some countries these might be called social security numbers, national insurance numbers etc.
There are other similar packages available but some are not updated anymore, some do not work with newer PHP versions, some only support one country etc. This package was created to better suit our needs. It only supports limited set of countries but adding new countries should be easy if syntax is described somewhere.
Features
- Parse and validate national identifier string
- Returns object with known properties extracted from the identifier
- Supported countries
- Austria
- Estonia
- Finland
- Sweden both personal- and organization numbers
- United Kingdom NI Number
Requirements
- PHP 7.4 or higher
- composer
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Open a command console, enter your project directory and execute:
Usage
Parse and validate identity number:
Alternative method for parsing identity number for specific country:
Calculate checksum and format Finnish personal identity number: