After document processing, some fields are missing

Contents

General Information

By default, the SDK only returns successfully identified fields after processing a document. However, it is possible to retrieve results for all fields by using the checkRequiredTextFields parameter.

When checkRequiredTextFields is set to true, the behavior of the SDK changes. Instead of returning only successfully recognized fields typical for that document template, it will output data for all fields, regardless of their recognition status.

validityStatus

validityStatus can have three possible values:

  • CH_CHECK_ERROR: 0 - check error
  • CH_CHECK_OK: 1 - check passed
  • CH_CHECK_WAS_NOT_DONE: 2 - check was not performed

Workflow with checkRequiredTextFields Disabled

  • Fields with no data are not displayed.
  • Fields with data but without applicable checks are assigned ValidityStatus:2.
  • Fields with data and performed checks:
  • Receive ValidityStatus:1 if the data meets the requirements and passes checks.
  • Receive ValidityStatus:0 if the data does not meet the requirements or fails checks.

Workflow with checkRequiredTextFields Enabled

  • Required fields (according to the database) with no data are created as empty fields with ValidityStatus:0.
  • Fields with data but without checks performed are assigned ValidityStatus:2.
  • Fields with data and performed checks:
  • Receive ValidityStatus:1 if the data meets the requirements and passes checks.
  • Receive ValidityStatus:0 if the data does not meet the requirements or fails checks.

It is important to note that the process of determining validityStatus involves multiple factors, including cross-checking with other sources and checksum verification. These verification procedures occur within the SDK and may not always be obvious. In addition, it should be emphasized that validityStatus is not directly related to the checkRequiredTextFields flag.

Usage Examples

Below are examples of how to enable the checkRequiredTextFields parameter on different platforms:

Java Kotlin Swift Objective-C Xamarin React Native Cordova Ionic Flutter
DocReader.shared.processParams.checkRequiredTextFields = true
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section

See more