MrzGenerationInvalidSexValue

data class MrzGenerationInvalidSexValue(val format: MrzFormat, val observed: Char) : MrzGenerationError

Generation error: a document's sex character is not M, F, or <.

Reported by generate(document) for the document's rawSex. ICAO Doc 9303 allows only these three characters in the MRZ; X is allowed only in the visual zone, so it is rejected too. The generator never replaces the character. Reading is unchanged: the parser keeps any character, and the validator reports X as MrzSexCharacterX.

Since

0.6.0

Constructors

Link copied to clipboard
constructor(format: MrzFormat, observed: Char)

Properties

Link copied to clipboard
open override val description: String

English text for logs: the format and the accepted set. It never contains the character; that is in observed.

Link copied to clipboard

The format being generated.

Link copied to clipboard

The sex character as supplied.

Functions

Link copied to clipboard
open override fun toString(): String

MrzGenerationInvalidSexValue: followed by description, so logs carry no document values.