Add a regular expression validation method
Use the procedure in this topic to add a regular expression validation method.
This validation method enables you create pattern-based restrictions on extracted data. You can define a regular expression pattern. If the extracted data does not match the pattern, the data is invalid.
For example, you create a regular expression to test that an extracted account or customer number follows the expected pattern. The extracted data does not match the pattern and is marked invalid. A Validation user must manually complete the process.
Augment the regular expression by including a dictionary. The words in the dictionary can be found within a composite expression, and using the dictionary eliminates the need for adding complex syntax to account for these words.
Once added, you can configure a Regular Expression Validation method using the Regular Expression 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
Regular Expression Validation from the
Type list and select
OK.
The regular expression validation properties window is displayed.
-
Configure the following settings:
Setting
Description
Format
Define one or more regular expression formats, or choose one from a list of predefined formats.
High performance
This mode is available only if a dictionary is used as a format. You can use it to speed up validation, particularly if the dictionary is very large. If this mode is selected, the settings of the dictionary are used instead of the ones defined in this window for this regular expression. (Default: Cleared)
Description
Specify a description for each format. The description is displayed in the list of formats in the table below. (Default: empty)
Error Description
Provide an error description that is displayed when this validation method is applied and there is an error. (Default: Field item does not match any of the given expressions)
Ignore characters
Provide a set of characters that are to be ignored for this format. If these characters are found in the result, they are treated as if they do not exist for validation purposes. (Default: Cleared)
Ignore case
When selected, ignores case when validating the results. (Default: Cleared)
Ignore blanks
When selected, treats blanks as if they do not exist for validation purposes. (Default: Cleared)
Formats list
As formats are added, they are displayed in table so you can keep track of your regular expressions.
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 regular expression validation method is in a sequence and the previous validation method in the sequence has failed. (Default: Cleared)
-
Optional. Test your settings.
The regular expression 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 regular expression validation method.
The regular expression validation is added to the list of validation methods.
- Optional. Repeat the above steps to add another regular expression validation method.
- Optional. Click OK to close the Project Settings window.
-
Optional. Add one or more of the following: