ValidationResult

data class ValidationResult(val validationFailures: List<MrzValidationError>, val warnings: List<MrzWarning>, val structuralFailure: MrzParseError? = null, val checks: List<MrzCheckRecord> = emptyList())

The result of validating an MRZ: validation failures, warnings, a structural failure, and one record per check.

Since

0.1.0

Constructors

Link copied to clipboard
constructor(validationFailures: List<MrzValidationError>, warnings: List<MrzWarning>, structuralFailure: MrzParseError? = null, checks: List<MrzCheckRecord> = emptyList())
constructor(validationFailures: List<MrzValidationError>, warnings: List<MrzWarning>, structuralFailure: MrzParseError?)

The constructor without checks: the checks come out empty.

Properties

Link copied to clipboard

One record per check, in MrzCheck order: which checks ran and how each went, so a consumer can tell "the document number check digit agreed" from "that check was not run". Every format reports its full set of checks, including the ones it does not have as CheckOutcome.NotApplicable; when structuralFailure is set, every check is CheckOutcome.NotRun with the failure named in the reason (MrzNotRunReason). Empty only when this result was built without checks. Default: an empty list.

Link copied to clipboard

The structural failure that stopped the input from being read: a wrong line count or length, a character outside the MRZ alphabet, or an undetected format.

Link copied to clipboard

Validation failures found. Empty if there are none, and when structuralFailure is set.

Link copied to clipboard

Warnings found. Empty if there are none, and when structuralFailure is set.