idnumbers
    Preparing search index...

    The Personal Numeric Code of Romania. This page is generated from the registry metadata of the library.

    Property Value
    Country code ROU, RO
    ID type Personal Numeric Code
    Official name Cod Numeric Personal (CNP)
    Also known as Personal Numerical Code; Cod Numeric Personal; CNP; Carte de identitate
    Display format SAALLZZJJNNNC
    Input masks #############
    Length 13
    Example 1800101226813
    Checksum yes
    Checksum algorithm Weighted sum mod 11 (weights 2,7,9,1,4,6,3,5,8,2,7,9; 10 -> 1)
    Parsable yes

    The root entry registers every country:

    import { validateNationalId } from 'idnumbers';

    validateNationalId('ROU', '1800101226813').isValid; // true

    To bundle only this country, import its definition from idnumbers/countries/rou and pass it to register():

    import { register, validateNationalId } from 'idnumbers/core';
    import { country } from 'idnumbers/countries/rou';

    register(country);
    validateNationalId('ROU', '1800101226813').isValid; // true