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.
  • When there are multiple conditions in the document rule and if the user corrects a value for validation, the conditions with AND and OR operators does not function in expected manner.
  • 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

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.
Note: The regex extract action extracts only the first match found in the value based on the specified regex pattern.

regex-action