Validation rules

Validation rules use regular expressions to determine if an extracted value is correct.

When an index field value is extracted from a document, Transact runs the extracted value against the validation rules for that index field. If the format of the extracted value matches the regular expressions (regex) set on the Validation Rules page, the field is automatically validated.

These rules are set at the index field level.

Prerequisites

To create and configure validation rules, the following prerequisites must be in place:

  • You must be logged in to Transact as Administrator.

  • You need a batch class with a document type configured. For detailed steps, see Add new document type.

  • Your document type should have at least one index field. For detailed steps, see Add index field.

Configure validation rules

To create and configure validation rules, do the following.

  1. From the Batch Class Management screen, select and open your batch class.
  2. Go to Document Types > <your document type> > Index Fields > <your index field> > Validation Rules.
  3. Click Add. This will create a new Pattern.
  4. From the drop-down list, select either Regex Builder or Regex Pool.
    • Regex Builder: Use a wizard to write your own custom regular expression.

    • Regex Pool: Search a collection of commonly used pre-defined regular expressions or regular expressions you previously added to your pool.

  5. Build a regular expression that matches your index field pattern.

    For more information, see Regular expressions.

    Example: For a U.S. phone number, use the following regular expression:

    \(?([0-9]{3})\)?[-\. ]?([0-9]{3})[-\. ]?([0-9]{4})$

    This will validate U.S. phone numbers entered in the following formats:

    • With or without parentheses around the area code.

    • With either a dash, period, space, or nothing separating each section of numbers.

  6. When you are satisfied with your pattern, click Apply.
  7. If desired, create additional validation rules for the index field as needed. Only one validation rule must be satisfied for the index field to be automatically validated.

Configure the validation operator

When creating multiple validation rules for a single index field, you can specify whether all rules must be satisfied for a field to be validated, or only one rule. To do so, change the Validation Operator on the Index Fields page.

  1. With your batch class open, go to Document Types > <your document type> > Index Fields.
  2. Select the Validation Operator for your index field.
    • OR: Only one rule must be satisfied (default).

    • AND: All rules must be satisfied.

  3. Click Apply.

Use validation rules

Validation rules are applied automatically by Transact during processing in the Automated Validation module.

If a validation rule cannot be satisfied, it is highlighted in red during validation for operator intervention. When the operator hovers on the red highlighting, the following message appears:

" <index field name> could not satisfy the validation pattern."

If an index field is consistently being marked as not satisfying the validation pattern, you may need to edit your existing rule or add another validation rule to cover the variation.