idnumbers
    Preparing search index...

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

    Property Value
    Country code LVA, LV
    ID type Personal Code
    Official name personas kods
    Also known as Personal Code; personas kods
    Display format DDMMYY-SSSSS
    Input masks ######-#####
    Length 11
    Example 161175-19997
    Checksum yes
    Checksum algorithm Weighted sum mod 11, then mod 10
    Parsable no

    The root entry registers every country:

    import { validateNationalId } from 'idnumbers';

    validateNationalId('LVA', '161175-19997').isValid; // true

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

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

    register(country);
    validateNationalId('LVA', '161175-19997').isValid; // true