Add field validation rules for a document type

Field validation rules are used to ensure that all document fields contain valid data with respect to the actual user requirements. You can create these rules at the time of defining a document type.

A validation rule uses a validation method to determine if the value entered is acceptable. There are different validation methods that can be used in a validation rule.

You can configure Post-Validation Handler business rules to run wherever validation takes place, such as capture form, Transformation Server, and more. The handler takes a document and list of fields being validated and handles them based on the custom validation logic.

  1. On the Home page, click Data > Extraction Group.
    Create a new extraction group, or edit an existing one.
  2. Select the document type for which to add a field validation rule, and click the Field Validation tab.
  3. If the Post Validation Handling is set to Yes (default:No), the handler runs post validation and some of the configuration settings, such as Always Valid are ignored for the field.

    Note At runtime:

    The field status (Valid, Forced Valid, Invalid or Confirmed) or error message changed by the post validation handler "forces" or overrides any standard validation rule result assigned to this field even if the changed state contradicts the standard rule logic. If the updated status is set as valid, the corresponding standard rule is treated as "passed" until the field value changes.

    If the post validation handler changes the status of a field that is a part of some multi-field rule, the status of this multi field rule is updated accordingly.

    If all the fields that are a part of this multi-field rule are valid after the status update, the multi-field rule is treated as passed until the value of any of these fields is changed. If all the fields of a multi-field rule were valid, but after post validation any of these fields is set as invalid, the multi-field rule is treated as not passed.

    Basically, if post validation handler updates the field status, the behavior is the same as in any standard rule.

    If post validation handler changes the field status, the ExtractionConfident property of the field is automatically set to true. It is assumed that the field status is updated using the SetDocumentFieldStatus SDK. This SDK also correctly propagates status up to hierarchy.

  4. Consume the Process Map.

    The process map should be synchronous and must have input variables of type String and Dynamic Complex. The Dynamic Complex variable must have four columns where first two columns must be of type String and the next two columns of type Short.

  5. To add field validation rules for a document type, click Add Add.

    The Validation Rule page appears with the configurations.

  6. Enter a Name for the field validation rule.
  7. On the Type list, select the validation method and configure the rule. See validation methods for more information.

    Available methods are:

    • Date

    • Regular Expression

    • Standard

  8. To override the execution of validation rules when a field is not extracted confidently or has been modified, click Yes for Rule Makes Uncertain Extraction Results Valid. (Default: No)
  9. Click OK.

    The Validation Rule page appears.

    Note the following:

    • Rule execution is based on the following order, each item must pass successfully:

      1. Formatters associated with a field.

      2. Rules associated with the single fields.

      3. A multi-field rule that a field is involved in. For example, business rule that uses more than one field as input.

        Note   A multi-field validation rule cannot be associated directly with a field. These rules exist at the document level and are executed based in the order they are defined (they can be reordered as necessary). The multi-field validation rules defined in the parent document type are inherited to the child document types.
    • When a business rule is executed and the rule fails, every field associated with the rule is marked as invalid.

    • If a business rule calls a CaptureDocumentService SDK API method in the context of a Classification or Extraction Activity, the API method will only have access to the document data prior to any updates made by the activity.

  10. Click Save.