idnumbers
    Preparing search index...

    Class Cedula

    Dominican Republic Cedula de Identidad y Electoral Format: NNN-NNNNNNN-N (series + document number + check digit) https://en.wikipedia.org/wiki/Cédula_de_identidad

    Implements

    Index
    METADATA: IdMetadata = ...
    • Calculate the expected Luhn check digit from the first 10 digits.

      This is the raw checksum calculation only -- it does not consult the exception list, so it can disagree with a legitimately-valid number. Use Cedula.validate for full validation.

      Parameters

      • idNumber: string

      Returns CheckDigit

    • Parse a Dominican Republic cedula number into its component parts. Returns null when the number fails validation.

      Parameters

      • idNumber: string

      Returns CedulaParseResult | null

    • Validate a Dominican Republic cedula number.

      A false result means the number failed format/checksum validation -- it does NOT mean "this person does not exist". A small, documented set of legitimately-issued cedulas (including modern 402-series cards) fail the standard Luhn checksum; those are matched against CEDULA_LUHN_EXCEPTION_SET (in ./exceptions.ts) before falling back to Luhn.

      Parameters

      • idNumber: string

      Returns boolean