CommonFields

data class CommonFields(val documentType: DocumentType, val issuingState: CountryCode, val primaryIdentifier: String, val secondaryIdentifier: String, val nameTruncated: Boolean, val rawNameField: String, val documentNumber: String, val nationality: CountryCode, val dateOfBirth: MrzDate, val sex: Sex, val rawSex: Char, val dateOfExpiry: MrzDate, val checkDigits: MrzCheckDigits)

The MRZ fields that every format carries.

toString() shows no document values; they are in the properties.

Since

0.1.0

Constructors

Link copied to clipboard
constructor(documentType: DocumentType, issuingState: CountryCode, primaryIdentifier: String, secondaryIdentifier: String, nameTruncated: Boolean, rawNameField: String, documentNumber: String, nationality: CountryCode, dateOfBirth: MrzDate, sex: Sex, rawSex: Char, dateOfExpiry: MrzDate, checkDigits: MrzCheckDigits)

Properties

Link copied to clipboard

Check digits as printed.

Link copied to clipboard

Date of birth.

Link copied to clipboard

Date of expiry.

Link copied to clipboard

Document number as printed, including any < filler.

Link copied to clipboard

Document type code as printed, with trailing < removed.

Link copied to clipboard

Issuing state code as printed.

Link copied to clipboard

true if the name field ends without a <.

Link copied to clipboard

Nationality code as printed.

Link copied to clipboard

Name before the first <<. Each < reads as a space.

Link copied to clipboard

Name field exactly as printed, before decoding. It keeps what the two identifiers lose.

Link copied to clipboard

Sex character as printed.

Link copied to clipboard

Name after the first <<, each < read as a space. Empty if there is none.

Link copied to clipboard
val sex: Sex

Sex read from rawSex: M is male, F is female, any other character is unspecified.

Functions

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

That the name fills its whole line; never a document value.