Add a date validation method
Use the procedure in this topic to add a date validation method.
This validation method enables you compare the extracted dates with a reference date and expected time period. You can also apply a date formatter to convert extracted dates into a consistent format.
For example, you create a project to process invoices. You configure a Date Validation method to meet the following business rules:
-
Do not process invoices older than six months
-
Do not process invoices newer than the current date
-
All dates need to be formatted using the YYYYMMMDDD date format
Once added, you can configure a Date Validation method using the Date Validation Properties window.
If this validation method is in a sequence of validation methods, it is not fired if the previous validation method fails.
- Open the tab.
-
Select
Add.
The New Validation Method window is displayed.
- In the Name field, enter a validation method name.
-
Select the
Date Validation from the
Type list and select
OK.
The date validation properties window is displayed.
-
Configure the following settings:
Setting
Description
Date Formatter
Choose a date formatter from the list. It is used to reformat the date before the validation check is performed and to provide the field’s DateValue property. (Default: No date formatter)
Reference Date
A reference date can be set that is used as a baseline to compare with the date found on the document. Select one of the following values:
- Today
-
Set the date the content is processed to be the reference date.
- Fixed Date
-
Manually specify a reference date.
Enter the reference date into the field or select it from the list. The list only contains multiple values if more than one date validation method is configured to use this setting.
Check for period before reference date
Restricts a date found on a document to be within the past N days. If a date falls outside the N days value, it is invalid. (Default: 30)
Check for period after reference date
Restricts a date on a document to be within N days after the reference date. If a date falls out side this range, it is invalid. (Default: 0)
This restricts all dates to be less than or equal to the date the content is processed.
Allow empty field
Allows an empty field to be valid. If this setting is not selected, and a field is empty, it is marked as invalid.
However, it is possible that even if this field is empty, it is marked as invalid. This happens if this date validation method is in a sequence and the previous validation method in the sequence has failed. (Default: Selected)
Sample input text
Enables you to test your configured settings by typing some sample text into the field and selecting the Validate button.
A message is displayed below the input field telling you the entered text is valid, or explains why it is not valid.
-
Optional. Test your settings
The date validation method is designed to validate one field at a time. Different fields can have different validation methods, but each method needs to be tested separately.
Enter a test string into the Sample input text field and select
Validate.
A message is displayed below the input field telling you the entered text is valid, or explains why it is not valid.
-
Select
OK to save your date validation method.
The date validation is added to the list of validation methods.
- Optional. Repeat the above steps to add another date validation method.
- Optional. Click OK to close the Project Settings window.
-
Optional. Add one or more of the following: