idnumbers
    Preparing search index...

    The National ID Number of Sri Lanka. This page is generated from the registry metadata of the library.

    Property Value
    Country code LKA, LK
    ID type National ID Number
    Official name National Identity Card (NIC)
    Also known as National ID Number
    Display format YYYYDDDSSSSC
    Input masks ############, #########L
    Length 10 to 12
    Example 199001200001
    Checksum yes
    Checksum algorithm Weighted sum mod 11 (weights 8,4,3,2,7,6,5,7,4,3,2; overflow folded mod 10)
    Parsable yes

    The root entry registers every country:

    import { validateNationalId } from 'idnumbers';

    validateNationalId('LKA', '199001200001').isValid; // true

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

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

    register(country);
    validateNationalId('LKA', '199001200001').isValid; // true