vladdesv / php-nin
Verify structure of individual national identification numbers
1.0.0
2020-05-01 17:13 UTC
Requires
- php: ^7.2
Requires (Dev)
- phpunit/phpunit: 8.0
This package is auto-updated.
Last update: 2025-05-06 18:35:49 UTC
README
National Identification Numbers
This library validates the structure of individual identification numbers. Currently supporting all Nordic countries.
Supported countries
- Sweden
- Personal identification numbers
- Coordination numbers
- Norway
- Birth numbers
- D-numbers
- H-numbers
- Finland
- Personal identity code
- Iceland
- Identification number
- Denmark
- Personal identification number
Usage
use NIN\NationalIdentificationNumberParser; $nin = NationalIdentificationNumberParser::tryParse('890629-1870', 'SE'); echo $nin; // '890629-1870' echo $nin->getCountryCode(); // 'SE'
Installation
composer require vladdesv/php-nin
License
MIT © Vladimirs Nordholm