MrzValidator
Checks a parsed MRZ for check digit, date, and sex observations and returns them.
Reports MrzCheckDigitMismatch, MrzDateNotInCalendar, and MrzInvalidSexValue as validation failures. Reports MrzExpiryDatePast, MrzExpiryDateImplausiblyFar, MrzExpiryDateCenturyNotInferred, MrzExpiryDateAfterNonHarmonizedPassportLimit, MrzNameTruncated, MrzUnknownCountryCode, MrzUnknownDocumentTypeCode, MrzSexCharacterX, and MrzPersonalNumberCheckDigitFiller as warnings. Visa formats have no composite check digit and no optional-data check digit.
Every validate result also carries ValidationResult.checks: one MrzCheckRecord per check in MrzCheck order, so a consumer can tell which checks ran and passed from the ones that failed or did not apply. The failures and warnings are unchanged by that list.
Since
0.1.0
Functions
Validates a parsed document and returns its validation failures and warnings.
Parses an MRZ string, detecting the format, and returns its validation result.
Parses pre-split MRZ lines, detecting the format, and returns their validation result.
Parses an MRZ string as the given format and returns its validation result.
Parses pre-split MRZ lines as the given format and returns their validation result.