Configure validation rules for a document type

Document validation ensures that all documents contain valid data. Validation rules automatically check algorithms and control the document structure. Create validation rules when you define a document type.

For example, you can use a validation rule to define the number of pages in your document, a message to display when the validation fails, and the condition such as, "The document must have at least 10 pages". The default number of pages in a document is 1.

Important The validation rule only runs for the Document Review activity; it does not run for the Validation activity.
  1. Select the Document Type for which to create the validation rule.
  2. Click the Validation tab.
  3. To check the number of pages inside a document at the time of extraction:
    1. Click Yes for Check the Number of Pages.
    2. Enter the Number of Pages (N) to check.
    3. Select the condition to associate with the number of pages:
      • 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: Valid documents must have exactly the same number of pages as specified.

    4. In the Failure Message box, enter the text to display when the validation fails.
  4. To use a business rule for document validation, do the following:
    1. Enter a Name for the business rule.
    2. Consume the Business Rule.
      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.
    3. Click Configure .
    4. Map document fields or System fields to Rule Inputs or type a static value for rule input.
      Note When using this document type in a process, you must map the following Business rule parameters as output:
      Business Rule Parameter Variable 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.

    5. Click OK.
      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.
    6. Click Add.
      Note If using a table in your document, you can consume a business rule which has a dynamic complex variable as an input and map the table fields to this variable.