Transact

⌘K
  1. Home
  2. Transact
  3. Features and Functions
  4. Administrator Role and Fe...
  5. Batch Class Management
  6. Index Fields
  7. Validation Rules

Validation Rules

This page provides an overview of validation rules in Ephesoft Transact. This information is intended for Transact administrators.

Prerequisites

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

  • You must be logged in to Transact as Administrator.
  • You will need a batch class with a document type configured. For detailed steps, refer to Add New Document Type.
  • Your document type should have at least one index field. For detailed steps, refer to Add New Index Field.

Overview

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

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

These rules are set at the index field level.

Configuring Validation Rules

This section describes how to create and configure validation rules for an index field.

  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.

Figure 1. Validation Rules

  1. Click Add. This will create a new Pattern.

Figure 2. New Pattern

  1. From the drop-down, 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.

Figure 3. Select Option

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

Figure 4. Phone Number Validation Rule

Note: In the example above, we’ve used the following expression for a phone number:

\(?([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.

For more information on regular expressions, refer to Regular Expressions.

  1. When you’re satisfied with your pattern, click Apply.
  2. 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.

Configuring 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.
    1. OR — Only one rule must be satisfied (default).
    2. AND — All rules must be satisfied.

Figure 5. Validation Operator

  1. Click Apply.

Using Validation Rules

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

If a validation rule cannot be satisfied, it will appear highlighted red during Validation for operator intervention. When hovered over, the following message appears:

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

Figure 6. Field Not Matching Validation Rule

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.

Conclusion

This completes an overview of how to create validation rules in Ephesoft Transact.