# Passport MRZ-Visual Consistency Check and MRZ Validity

## Field Verification Result enum

| enum | Constant            | Description                              |
| ---- | ------------------- | ---------------------------------------- |
| 0    | RCF\_DISABLED       | comparison wasn't done, result undefined |
| 1    | RCF\_VERIFIED       | verification passed                      |
| 2    | RCF\_NOT\_VERIFIED  | verification failed                      |
| 3    | RCF\_Compare\_True  | positive comparison result               |
| 4    | RCF\_Compare\_False | negative comparison result               |

## Matrix In JSON Result

![Matrix Array](/files/-LvxyMdwDR_CWT9n8sLw)

## Interpretation of Matrix

For MRZ data validity, look at index 0; for MRZ-VISUAL consistency check, look at index 5.

| Index | Meaning                                                          |
| ----- | ---------------------------------------------------------------- |
| 0     | MRZ data verification result                                     |
| 1     | RFID-chip data verification result                               |
| 2     | document filling text fields data verification result            |
| 3     | bar-codes data verification result                               |
| 4     | MRZ and RFID-chip data comparing result                          |
| 5     | MRZ and document filling text fields data comparing result       |
| 6     | MRZ and bar-codes data comparing result                          |
| 7     | document filling text fields and RFID-chip data comparing result |
| 8     | document filling text fields and bar-codes data comparing result |
| 9     | RFID-chip and bar-codes data comparing result                    |

## Fields To Be Checked for Data Consistency

| FieldType | FieldName           |
| --------- | ------------------- |
| 0         | Document class code |
| 1         | Issuing state code  |
| 2         | Document #          |
| 3         | Date of expiry      |
| 5         | Date of birth       |
| 12        | Sex                 |

## Fields to be Checked for Data Validity

| FieldType | FieldName                       |
| --------- | ------------------------------- |
| 80        | Check digit for document number |
| 81        | Check digit for date of birth   |
| 82        | Check digit for date of expiry  |
| 84        | Final check digit               |

## Passport MRZ Interpretation

![](/files/-Mbit3KUjKpG-fN3aMyV)

| Positions | Length | Meaning                                                            |
| --------- | ------ | ------------------------------------------------------------------ |
| 1–9       | 9      | Passport number                                                    |
| 10        | 1      | Check digit over digits 1–9                                        |
| 11–13     | 3      | Nationality (ISO 3166-1 alpha-3 code with modifications)           |
| 14–19     | 6      | Date of birth (YYMMDD)                                             |
| 20        | 1      | Check digit over digits 14–19                                      |
| 21        | 1      | Sex (M, F or < for male, female or unspecified)                    |
| 22–27     | 6      | Expiration date of passport (YYMMDD)                               |
| 28        | 1      | Check digit over digits 22–27                                      |
| 29–42     | 14     | Personal number (may be used by the issuing country as it desires) |
| 43        | 1      | Check digit over digits 29–42 (may be < if all characters are <)   |
| 44        | 1      | Check digit over digits 1–10, 14–20, and 22–43                     |

{% hint style="info" %}
Download this document for details.
{% endhint %}

{% file src="/files/-Lvy0DQ9HD\_podIgZryh" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-old.innov8tif.com/okaydoc/data-consistency-check/passport-mrz-visual-consistency-check-and-mrz-validity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
