Skip to content

Validate structure of personal national identification numbers in PHP

License

Notifications You must be signed in to change notification settings

vladdeSV/php-nin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

National Identification Numbers

php version latest release codecov styleci

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

About

Validate structure of personal national identification numbers in PHP

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages