Repository navigation
Release 1.13.0
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.456and5123456, are now accepted.METADATA.min_lengthis 7. -
AUT entity UID (#345): require the
Uprefix;
other letters are rejected byvalidate()and the input guard inchecksum(), 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-00to999.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
xas the
final check character; parsed and calculated check characters remain canonicalXor integers. Checksum arithmetic,
calendar validation and region policy are unchanged; region/issuance checks remain deferred to
#451. -
CYP tax number (#348): prefix
12is rejected;
checksum()remains unchanged. -
DEU tax ID (IdNr) (#289): the digit rules now follow the
ELSTER specification. A leading0is rejected, which includes ELSTER test numbers such as02476291358. Among the
first ten digits, exactly one digit must appear twice or three times, so39825979193(four 9s) and36794081522
(no repeated digit) are rejected. A check digit equal to the two digits before it is no longer rejected, so
38056471999is 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 ofyy > 50.parse()reads
0101451234as 1945-01-01 instead of 2045-01-01, and 1858-1899 births are recognised.2902000000(29 February 1900)
is now rejected and2902004000(29 February 2000) is valid. A birth date in the future is rejected. -
ESP DNI (#349):
validate()andchecksum()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
96is now accepted. It
was used for Tunisia before 1964, like 91-95 for Algeria and Morocco, so145089612304582is now valid. -
IDN NIK (#293): encoded birth days are now validated as
01-31for men and41-71for women. Impossible dates are rejected, while 29 February with year00is
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 toA,B,H,Wor a space; other letters are rejected even when the check character is correct.
The whitespace restriction was already fixed in #369.
HistoricalT/Xsuffix handling remains out of scope and is tracked in
#433. -
IRN national ID (#295): codes made of one repeated digit,
0000000000to9999999999, are now rejected, including supported hyphenated formats.checksum()is unchanged. -
ISR identity number (#350): reject
000000000even 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-12are
now rejected, including checksum-correct750061381659(month00).checksum()is unchanged. -
LKA NIC (#299): both old and new formats now reject encoded
birth-day values outside001-366for men and501-866for 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 rejects70002290015(29 February 2100).checksum()is unchanged.
First-digit policy for0and9remains out of scope in #337. -
LVA personal code (#301): legacy codes now require a valid
calendar date and century digit0/1/2; unsupported prefixes00and40-99are rejected even with a correct
check digit. Date-free modern prefixes32-39remain 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()andparse()reject
the 81 original inconvenient name prefixes in RENAPO's catalogue. Their second-letterXreplacements remain
accepted when otherwise valid; standalonechecksum()is unchanged. -
NLD BSN (#303): compact nine-digit numbers such as
123456782are now accepted, while the existing fully dotted layout1234.56.782remains accepted. All-zero
numbers remain rejected in both formats; the 11-proof andchecksum()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
CitizenCardfor compact 12-character
document numbers with the full-card checksum.CivilIDNumberandNationalIDremain BI/NIC-only. NIF now accepts
prefixes74,75,77,78and79; 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 separateCoordinationNumbersupport for samordningsnummer,
with encoded birth day +60 and decoded dates inparse().NationalIDremains personnummer-only; existing
10-digit-/+decoding and checksum-calculator behavior are unchanged. -
UKR EDRPOU (#312): a second-pass remainder of
10now
maps to check digit0, so57334830and43089360are 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, separatingNumri i Identitetit të ShtetasitandNISHinto the intended six names. -
BGD national ID (#346):
parse()returnsyyyyas
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 code7, the
temporary number for a man, as male. Codes3and4are 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 returnsddas two digits. The alpha-2 metadata is
corrected fromIDNtoID. -
KAZ BIN (#297):
parse()now reports entity code5as
NonResidentEntityand code6asIP(individual entrepreneurs in a joint enterprise), rather than
ResidentEntity. Code4remainsResidentEntity. -
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/2to the 1800s,3/4to the 1900s,5/6to the 2000s and7/8to the 2100s. Odd digits still
report male and even digits female;39001010077now reports 1990-01-01 instead of 1890-01-01. -
NZL passport (#306): remove the unrelated
NINmetadata
name; passport validation is unchanged. -
PAK national ID (#307): correct the alpha-2 metadata from
PAtoPK; 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,
separatingNúmero de identificação fiscalandNIFinto 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.mdin the source
distribution; wheel contents are unchanged.