Validation rules in Document Automation

With validation rules, you can ensure the accuracy of extracted data across multiple fields in your documents.

You can define various conditions, such as pattern matching or equality checks. When those conditions are met, you can effortlessly take action to flag errors or warnings, clean up or replace values, or set new values.

Enhanced validation rules can be applied on two levels:
  • Field Rules
  • Document Rules

Field rules

Field-level rules are designed to create rules specifically for individual fields. These rules contain a condition that is followed by a set of actions to be performed if the condition is met and is implicitly associated with the highlighted field.

Field level validation rules

These rules are processed before document-level validation rules.

Document Rules

A document level rule is associated with a field but can have conditions and actions that are dependent on values of other fields. With these rules, you can build complex structure of conditions that can include several fields and encompass extensive actions. Document level validation rules
Note:
  • You can select one or more fields where these actions can be applied.
  • The document rules can be structured with dependencies between fields, and their execution order is crucial. It is important to maintain the sequence.
  • You must enter all the populated fields while adding a field or document rule to get the Update option enabled.

    For example, you must add an Action value for selected Action type and then update the learning instance.

In the following video, you can observe how validation rules are utilized within documents to enhance the process of data extraction.

Available conditions

A condition is expressed as a logical rule that evaluates the state or values of certain fields that must be met for an action to occur. Below is the list of all the available conditions:

DA-available-conditions

Action type Description
equal to Validates whether data in a field is equal to a certain value.
not equal to Validates whether data in a field is not equal to a certain value.
contains Validates whether data in a field contains a certain value.
doesn't contain Validates whether data in a field does not contain a certain value.
starts with Validates whether data in a field starts with a certain value.
doesn't start with Validates whether data in a field does not start with a certain value.
ends with Validates whether data in a field ends with a certain value.
doesn't end with Validates whether data in a field does not end with a certain value.
is empty Validates whether data in a field is empty.
is not empty Validates whether data in a field is not empty.
does match regex Validates whether data matches the defined regular expression. See Regex pattern validation.
does not match regex Validates whether data does not match the defined regular expression. See Regex pattern validation.
does match formula Validates whether data matches the defined formula. See Formula validation.
does not match formula Validates whether data does not match the defined formula. See Formula validation.
is in list Validates whether data is part of a list.
is not in list Validates whether data is not part of a list.

Available actions

An action is associated with an operation that is performed when certain conditions are met. Below is the list of all the available actions:

DA-available-actions

When the specified conditions are met, these actions filter the generated output and provide more accurate document data.
Action type Description Example
set value If the specified condition meets, the set value action sets the specified value for the selected fields.

Set-value-action

clear value If the specified condition meets, the clear value action clears the values of the selected fields.

Clear-value-action

show error If the specified condition meets, the show error action shows the error message for the selected fields.

show-error-action

show warning If the specified condition meets, the show warning action shows the warning message for the selected fields.

show-warning-action

replace If the specified condition meets, the replace action replaces the values of the selected fields.

replace-action

regex extract If the specified condition meets, the regex extract action applies a regular expression to the extracted value to retrieve a specific sub-string. If the specified condition is not met, then empty string is returned. See Regex pattern validation.
Note: The regex extract action extracts only the first match found in the value based on the specified regex pattern.

regex-action