FA-72627 / Check-digit algorithms / Member archive
MRZ rejects the filler check on an empty optional field · case 02
Passports with no optional data and a "<" check character report a bad optional check.
Case contract
Machine-readable passport (TD3) second line, 44 characters of 0-9, A-Z and the filler "<" (else "malformed"). Check digits use weights 7,3,1 restarting per field, "<" = 0, A-Z = 10-35: document number [0:9] check [9]; birth date [13:19] check [19]; expiry [21:27] check [27]; optional data [28:42] check [42] (a "<" check is allowed only when the optional field is entirely filler); composite check [43] over [0:10]+[13:20]+[21:43]. Return five booleans.
Why this case matters
Border-control kiosks verify MRZ check digits to catch OCR misreads before a database query.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["Z74II1W798UTO2103259F3311282<<<<<<<<<<<<<<<2"] | [false, true, true, false, false] | [false, true, true, true, false] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗