You can use a data pattern validation rule to validate if a field value matches a defined pattern.
To set up a data pattern validation rule, first set up the data pattern to be applied. Define the data pattern, using a regular expression.
You can, for example, set up data patterns to validate:
  • Email addresses
  • Website URLs
  • VAT numbers
For more information on regular expressions, refer to Regular expression.


Standard procedure

1. Click Data quality management.
2. Click Data patterns.
3. Click New.
4. In the Pattern ID field, type a value.
5. In the Description field, type a value.
6. Expand the Data pattern section.
7. Define the data pattern, using a regular expression.
  In the Pattern field, type a value.
8. For a data pattern, you can define a validation message that can be shown when the validation rule is not met.
  Expand the Message section.
9. You can define a validation message for the data pattern.
  In the Validation message field, type a value.
 

Note: You can also define a validation message for a validation rule.
The validation message priority is:
1. If a validation rule message is defined, the validation rule message is shown.
2. If no validation rule message is defined, the data pattern message, as defined in the current field, is shown.
3. If no data pattern message is defined, the default message is shown.

10. Sub-task: Test data pattern.
  10.1 You can enter several test scenarios to test the data pattern and see if it gives the expected validation results.
  Expand the Test scenarios section.
  10.2 Click New.
  10.3 Enter the value to be tested, You can enter test values that you expect to pass or to fail.
For example, your date pattern is DD-MM-YYYY (regular expression: (([1-2][0-9])|([1-9])|(3[0-1]))/((1[0-2])|([1-9]))/[0-9]{4}).
You can enter a test value that:
- Matches the pattern, like 14-06-2022.
- Doesn't match the pattern, like 14/06/2022 or 06-14-2022.
  In the Test value field, type a value.
  10.4 Indicate if you expect the test value to pass or fail the test.
For example, if the test value:
- Matches the pattern, like 14-06-2022, select Pass.
- Doesn't match the pattern, like 14/06/2022 or 06-14-2022, select Fail.
  In the Expected field, select an option.
  10.5 Test if the test values comply with the data pattern and if the expected result matches the actual result.
If you click Test:
- All test scenarios are tested.
- The Actual field values are refreshed.
- For each test scenario, the test result is shown.
If the actual result and the expected result:
- Match, the test scenario has passed the test.
- Don't match, the test scenario has failed the test. Check if the expected result or the data pattern is correct and make changes where needed.
  Click Test.
11. Sub-task: Translate data pattern description and message.
  11.1 You can translate both the validation message and the data pattern description into several languages.
  Click Translations.
  11.2 Click Add to open the drop dialog.
  11.3 In the list, find and select the desired language.
  11.4 Click OK.
  11.5 In the Description field, type the translation of the data pattern description.
  11.6 In the Validation message field, type the translation of the validation message.
  11.7 Close the page.
12. Close the page.

Notes

Each time you make and save a change to the data pattern in the Pattern field, a new version of the data pattern is created. You can:

  • View a list of previous versions, showing the changes made to the pattern. To do so, on the Data patterns page, click Changes timeline, View changes.
  • Manage data pattern versions. For example, delete a data pattern version which pattern change is no longer required. To do so, on the Data patterns page, click Changes timeline, Manage changes.

Provide feedback