Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# MrzHelper.check Method

Module: MrzHelper

## Definition

Checks the validity of a single line of an MRZ of a given type by checking the check digits.

Python

    @staticmethod
    check(text: str, type: MrzType) -> bool

Parameters

> `text` str
> in The input MRZ line.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> `bool`
> The result of the verification.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    static bool check(String? text, MrzType type)

Parameters

> `text` String
> in The input MRZ line.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> `bool`
> The result of the verification.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public static bool Check(string text, MrzType type)

Parameters

> `text` string
> in The input MRZ line.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> `bool`
> The result of the verification.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public static boolean check(String text, MrzType type) throws DocumentException

Parameters

> `text` String
> in The input MRZ line.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> `boolean`
> The result of the verification.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

    public static func check(text: String, type: MrzType) throws -> Bool

Parameters

> `text` String
> in The input MRZ line.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> `Bool`
> The result of the verification.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentMrzHelper_Check (
        const char * text,
        id3DocumentMrzType eType,
        bool * validity)

Parameters

> `text` const char *
> in The input MRZ line.
> `eType` id3DocumentMrzType
> in The input MRZ type according to ICAO-9303 standard.
> `validity` bool *
> out The result of the verification.

Returns

> `int`
> An error code.
> See id3DocumentError file for the list of possible error codes.