Inline rule validation method
Use the Inline rule validation method to define validation logic directly on a field or at the document type level without creating a separate business rule validator.
This provides a simpler alternative to creating business rule validators when you need basic validation functionality.
There are two types of inline validation rules:
-
Single Field Validation Rule: Defines validation logic directly on a field in the field properties panel (Validation tab). The rule is associated with a specific field and cannot be changed to validate a different field. For more information on configuring validation rules on document fields, see Configure field validation properties.
-
Multi-Field Validation Rule: Defines validation logic for multiple fields at the document type level in the document type properties panel (Field validation tab). The rule validates relationships between multiple fields.
Configure an inline rule validation method
You can define validation logic for multiple fields at the document type level in the document type properties panel.
- Open the extraction group and select the document type for which to define a field validation rule.
- On the properties panel, select the Field validation tab.
-
Select for Validation rules.
The New validation rule dialog box is displayed.
- On the Type list, select Inline rule. (Default: Regular expression)
-
Configure the rule properties.
Property Description Name
Enter a unique name for the validation rule (mandatory). The name must be unique for that document type.
Inputs
Add document fields to be validated by this rule.
-
Select at least two input fields.
-
Table fields cannot be added as inputs.
Condition
Define the rule that must evaluate to true/false to set the IsValid property of all the fields that are set as inputs.
Conditions may reference fields, field properties, document properties, and supported built-in functions.
Failure
-
Error message: The text to display if validation fails.
-
Error code: The error code to display if validation fails. The dropdown displays the error codes configured in the error codes page.
Validate
The rule is statically validated for syntax errors and type correctness before it can be saved.
Test
Test the rule against sample values to ensure it works as expected before saving.
-
-
Select
Save.
-
The inline multi-field validation rule is saved at the document-type level, not on any individual field.
-
Validation rules are executed in the order displayed in the validation rule list. A validation rule is executed only if all preceding validation rules have passed.
-
The execution order is .
-
-
Inline validation rules are executed automatically during:
-
Scan: When manually entering field values.
-
Extraction: When fields are extracted from the document.
-
Validation: When confirming updates to fields.
-
-
If a multi-field inline rule fails, all input fields are marked invalid (the IsValid property of the fields is set to false), and it returns the configured error message or error code.
-