Skip to content

Release 1.13.0

Choose a tag to compare

@AngusHsu AngusHsu released this 07 Oct 08:53
0587954

1.13.0 (2026-10-07)

Validity changes

  • ALB identity number (#344): decoded birth dates after today
    are rejected, using the date rather than a fixed decade cap. The existing historical year range is unchanged,
    pending confirmation in #446.

  • ARG DNI (#280): 7-digit numbers (below 10 million), such as
    5.123.456 and 5123456, are now accepted. METADATA.min_length is 7.

  • AUT entity UID (#345): require the U prefix;
    other letters are rejected by validate() and the input guard in checksum(), even with a correct
    check digit. The checksum arithmetic and supported separators are unchanged.

  • BRA CPF (#284): numbers made of one repeated digit,
    000.000.000-00 to 999.999.999-99, are now rejected. They pass the check digits, but the federal civil-registry
    system SIRC lists repeated digits as a reason for an invalid CPF. checksum() is unchanged.

  • CHN resident ID (#347): accept ASCII lowercase x as the
    final check character; parsed and calculated check characters remain canonical X or integers. Checksum arithmetic,
    calendar validation and region policy are unchanged; region/issuance checks remain deferred to
    #451.

  • CYP tax number (#348): prefix 12 is rejected;
    checksum() remains unchanged.

  • DEU tax ID (IdNr) (#289): the digit rules now follow the
    ELSTER specification. A leading 0 is rejected, which includes ELSTER test numbers such as 02476291358. Among the
    first ten digits, exactly one digit must appear twice or three times, so 39825979193 (four 9s) and 36794081522
    (no repeated digit) are rejected. A check digit equal to the two digits before it is no longer rejected, so
    38056471999 is now valid.

  • DNK CPR number (#290): the century now comes from the
    seventh digit and the two-digit year, as the CPR office's table defines it, instead of yy > 50. parse() reads
    0101451234 as 1945-01-01 instead of 2045-01-01, and 1858-1899 births are recognised. 2902000000 (29 February 1900)
    is now rejected and 2902004000 (29 February 2000) is valid. A birth date in the future is rejected.

  • ESP DNI (#349): validate() and checksum() now accept
    ASCII lowercase check letters and strip surrounding whitespace. Checksum arithmetic and the eight-ASCII-digit
    plus ASCII-letter payload format are unchanged; internal whitespace and separators remain invalid.

  • FRA NIR (#291): birth department 96 is now accepted. It
    was used for Tunisia before 1964, like 91-95 for Algeria and Morocco, so 145089612304582 is now valid.

  • IDN NIK (#293): encoded birth days are now validated as
    01-31 for men and 41-71 for women. Impossible dates are rejected, while 29 February with year 00 is
    accepted because it exists in 2000 even though it does not exist in 1900; NIK does not identify the century.

  • IRL PPS number (#294): the optional second suffix character
    is now limited to A, B, H, W or a space; other letters are rejected even when the check character is correct.
    The whitespace restriction was already fixed in #369.
    Historical T/X suffix handling remains out of scope and is tracked in
    #433.

  • IRN national ID (#295): codes made of one repeated digit,
    0000000000 to 9999999999, are now rejected, including supported hyphenated formats. checksum() is unchanged.

  • ISR identity number (#350): reject 000000000 even though
    it passes Luhn. checksum() is unchanged; the exact nine-digit format remains required. Shorter-number padding
    policy is deferred to #455.

  • KAZ BIN (#297): registration months outside 01-12 are
    now rejected, including checksum-correct 750061381659 (month 00). checksum() is unchanged.

  • LKA NIC (#299): both old and new formats now reject encoded
    birth-day values outside 001-366 for men and 501-866 for women, even with a correct checksum.
    checksum() and within-range date decoding are unchanged; leap-year-specific decoding remains out of scope in
    #437.

  • LTU personal code (#300): century decoding now accepts
    50002290013 (29 February 2000) and rejects 70002290015 (29 February 2100). checksum() is unchanged.
    First-digit policy for 0 and 9 remains out of scope in #337.

  • LVA personal code (#301): legacy codes now require a valid
    calendar date and century digit 0/1/2; unsupported prefixes 00 and 40-99 are rejected even with a correct
    check digit. Date-free modern prefixes 32-39 remain accepted per current primary sources. checksum() is
    unchanged; the modern checksum requirement remains out of scope in
    #440.

  • MAC identity number (#351): parentheses around the final
    digit must be paired; unbalanced forms are rejected. Compact eight-digit and printed parenthesized forms remain
    accepted, with unchanged parse payloads and eight-significant-digit length metadata.

  • MEX CURP (#352): validate() and parse() reject
    the 81 original inconvenient name prefixes in RENAPO's catalogue. Their second-letter X replacements remain
    accepted when otherwise valid; standalone checksum() is unchanged.

  • NLD BSN (#303): compact nine-digit numbers such as
    123456782 are now accepted, while the existing fully dotted layout 1234.56.782 remains accepted. All-zero
    numbers remain rejected in both formats; the 11-proof and checksum() are unchanged.

  • NZL (#306): the expanded NHI checksum now uses modulus
    23 and check-letter indices 1-23, per HISO 10046:2024; the legacy numeric checksum is unchanged. Driver licence
    prefixes now require two ASCII letters, preserving lowercase acceptance and the trailing-digit blacklist. IRD
    numbers must be within the current inclusive 10,000,000-200,000,000 range and pass the existing checksum.

  • PRT (#353): add CitizenCard for compact 12-character
    document numbers with the full-card checksum. CivilIDNumber and NationalID remain BI/NIC-only. NIF now accepts
    prefixes 74, 75, 77, 78 and 79; its checksum arithmetic and other prefix rules are unchanged.

  • SWE (#311): personnummer now accepts 10- and 12-digit
    compact forms and optional -/+ separators; explicit four-digit years determine the century. Only the two
    century digits are excluded from the checksum. Add separate CoordinationNumber support for samordningsnummer,
    with encoded birth day +60 and decoded dates in parse(). NationalID remains personnummer-only; existing
    10-digit -/+ decoding and checksum-calculator behavior are unchanged.

  • UKR EDRPOU (#312): a second-pass remainder of 10 now
    maps to check digit 0, so 57334830 and 43089360 are accepted. Existing weight selection is unchanged;
    the separate selection question remains tracked in #342.

Other fixes

  • ALB identity number (#344): the missing metadata comma is
    restored, separating Numri i Identitetit të Shtetasit and NISH into the intended six names.

  • BGD national ID (#346): parse() returns yyyy as
    the declared four-character string, preserving leading zeros. The national ID metadata lengths are corrected to 17;
    old national ID metadata remains 13.

  • BIH (#354): correct the JMBG class country label to
    Bosnia and Herzegovina; validation and parsing are unchanged.

  • CHN resident ID (#419): add regression coverage for
    October birth dates, already fixed in #275;
    validity is unchanged.

  • FRA NIR (#291): parse() now reports gender code 7, the
    temporary number for a man, as male. Codes 3 and 4 are still reported as female, because no source says which sex
    they stand for (#429).

  • GRC (#354): correct new identity-card length metadata to
    eight significant characters. Old-card metadata remains seven; optional-hyphen validation is unchanged.

  • IDN NIK (#293): parse() now decodes women's day numbers by
    subtracting 40, reports gender from the encoded day, and always returns dd as two digits. The alpha-2 metadata is
    corrected from IDN to ID.

  • KAZ BIN (#297): parse() now reports entity code 5 as
    NonResidentEntity and code 6 as IP (individual entrepreneurs in a joint enterprise), rather than
    ResidentEntity. Code 4 remains ResidentEntity.

  • KOR (#354): clarify that both RRN classes count 13
    significant digits in metadata; validation and parsing still require the hyphenated 14-character layout.

  • LTU personal code (#300): parse() now maps first digits
    1/2 to the 1800s, 3/4 to the 1900s, 5/6 to the 2000s and 7/8 to the 2100s. Odd digits still
    report male and even digits female; 39001010077 now reports 1990-01-01 instead of 1890-01-01.

  • NZL passport (#306): remove the unrelated NIN metadata
    name; passport validation is unchanged.

  • PAK national ID (#307): correct the alpha-2 metadata from
    PA to PK; validation and parsing are unchanged.

  • PHL (#354): identify the existing 12-digit format as the
    PhilSys Number (PSN), not the 16-digit PhilID Card Number (PCN). Public class names, aliases and validation are
    unchanged.

  • PRT NIF (#353): restore the missing metadata comma,
    separating Número de identificação fiscal and NIF into the intended three names.

  • USA (#354): clarify that SSN metadata counts nine
    significant digits; validation still requires the two hyphens in the 11-character printed layout.

  • ZAF national ID (#419): add regression coverage for
    October birth dates, already fixed in #275;
    validity is unchanged.

  • Documentation (#409): escape closing parentheses in
    docstring URLs so API reference links preserve complete paths and fragments. Validation and metadata are unchanged.

  • Packaging (#419): include CHANGELOG.md in the source
    distribution; wheel contents are unchanged.