Document validation ensures that all documents contain valid data.

Using a validation rule, you can define the number of pages to check in your document, a condition such as, The document must have at least 10 pages, and a message to display when the validation fails. The validation rules automatically check algorithms, and control the document structure.

Important A validation rule only runs for the Document review activity; it does not run for a Validation activity.

Configure validation rules for a document type

  1. Open the extraction group and select the document type for which to define a validation rule.
  2. On the properties panel, click the Validation tab.
  3. To check the number of pages inside a document at the time of extraction, perform the following steps:
    1. Select Check the number of pages.
    2. Select the condition to associate with the No of pages (N):

      • At least: Valid documents must have at least the specified number of pages.

      • At most: Valid documents must have no more than the specified number of pages.

      • Exactly (default): Valid documents must have exactly the same number of pages as specified.

    3. Enter or select the No of pages (N) to check. (Default: 1)
    4. In the Failure message field, enter the text to display when the validation fails. (Default: Every document of this type must have N pages)
  4. To use a business rule for document validation, perform the following steps:
    1. Click for Business rule.

      The New business rule validator dialog box is displayed.

    2. Enter a Name for the business rule validator.
    3. On the Business rule list, select the business rule for document validation.

      Click to select the business rule from a specific Category. You can also Filter the business rules by name.

      Note 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.

    4. Map the document fields or System fields to rule inputs, or type a static value for rule input.
    5. When using this document type in a process, map the following business rule parameters as output.

      Name Type Description
      IsValid Boolean Checks if the document is correctly validated.
      ErrorMessage String Contains the message to display if validation fails.

      The business rule activity can access any fields or system fields within the document process variable.

      Note If using a table in your document, you can associate a business rule that has a dynamic complex variable as an input, and map the table fields to this variable.
    6. Click Add.

      Note If a business rule is being executed from the Transformation Server during validation, any integration nodes, such as Email and SharePoint do not work.

  5. Click Save.