The Personal Identity Number of Denmark. This page is generated from the registry metadata of the library.
| Property | Value |
|---|---|
| Country code | DNK, DK |
| ID type | Personal Identity Number |
| Official name | CPR-nummer |
| Also known as | personal identity number; CPR; Det Centrale Personregister |
| Display format | DDMMYY-SSSS |
| Input masks | ######-#### |
| Length | 10 |
| Example | 0101001234 |
| Checksum | no |
| Checksum algorithm | None (modern CPR numbers carry no check digit; not validated) |
| Parsable | yes |
The root entry registers every country:
import { validateNationalId } from 'idnumbers';
validateNationalId('DNK', '0101001234').isValid; // true
To bundle only this country, import its definition from idnumbers/countries/dnk and pass it to register():
import { register, validateNationalId } from 'idnumbers/core';
import { country } from 'idnumbers/countries/dnk';
register(country);
validateNationalId('DNK', '0101001234').isValid; // true