idnumbers
    Preparing search index...

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

    Property Value
    Country code IRN, IR
    ID type National ID Number
    Official name کارت ملی (kart-e-meli)
    Also known as National ID Number; kart-e-meli; کارت ملی
    Display format ###-######-#
    Input masks ###-######-#
    Length 10
    Example 0012345679
    Checksum yes
    Checksum algorithm Weighted sum mod 11 (weights 10..2; remainder < 2 → remainder, else 11 - remainder)
    Parsable no

    The root entry registers every country:

    import { validateNationalId } from 'idnumbers';

    validateNationalId('IRN', '0012345679').isValid; // true

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

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

    register(country);
    validateNationalId('IRN', '0012345679').isValid; // true