This library validates the structure of individual identification numbers. Currently supporting all Nordic 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
use NIN\NationalIdentificationNumberParser;
$nin = NationalIdentificationNumberParser::tryParse('890629-1870', 'SE');
echo $nin; // '890629-1870'
echo $nin->getCountryCode(); // 'SE'
composer require vladdesv/php-nin
MIT © Vladimirs Nordholm