Mrz
A key from the MRZ: the document number, the date of birth and the date of expiry, each with its check digit.
Give each value exactly as it is printed in the MRZ, fillers (<) included, and the check digits as printed, even when one does not match its field: the chip was set up with the printed values, and the SDK never corrects them. From a parsed or scanned MRZ use Companion.from; when a person types the values in, use Companion.fromTypedFields, which works out the check digits.
Every value may hold only the MRZ characters A to Z, 0 to 9 and <.
The document number is always the complete number (Doc 9303 Part 11, section 9.7.3). On a TD1 or TD2 document whose number is longer than nine characters, the number field holds only its first nine, the check-digit place holds a filler (<), and the rest of the number and its check digit sit at the start of the optional data. Give such a number whole, with its real check digit, or let fromPrintedFields join it from the printed fields.
Since
1.0.0
Parameters
The complete document number as printed, at least one character: the nine-character field with its fillers, or a longer number joined from the optional data.
The check digit of the document number, as printed.
The date of birth as printed, six characters (YYMMDD).
The check digit printed after the date of birth.
The date of expiry as printed, six characters (YYMMDD).
The check digit printed after the date of expiry.
Throws
when a value is empty, has the wrong length, or holds a character outside the MRZ characters, or when documentNumberCheckDigit is <: that filler marks a number that goes on in the optional data, so the number given is not complete. The message names the parameter, never the value.
Constructors
Types
Properties
The fields whose printed check digit does not match the digit computed from the field (ICAO Doc 9303 Part 3, section 4.9): any of MrzField.DOCUMENT_NUMBER, MrzField.DATE_OF_BIRTH and MrzField.DATE_OF_EXPIRY; empty when all three match.