--- title: "Set up data pattern - Data Quality Studio" slug: "set-up-data-pattern-general" description: "Validate field values with data pattern rules using regular expressions for emails, URLs, and VAT numbers. Learn to set up and test validation effectively." tags: ["Task topic"] status: "update" updated: 2026-10-05T12:26:04Z published: 2026-10-05T12:26:04Z canonical: "docs.staedean.com/set-up-data-pattern-general" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Set up data pattern - Data Quality Studio 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](https://en.wikipedia.org/wiki/Regular_expression). ### Steps 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, you can use these tags: In the **Validation message** field, type a value. > [!NOTE] > 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. - **Field name**: When the validation message is shown, the [Field name] tag is replaced with the name of the validated field. - **Field value**: When the validation message is shown, the [Field value] tag is replaced with the value that is entered in the validated field. 10. Sub-task: Test data pattern. 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. 2. Click **New**. 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: In the **Test value** field, type a value. - Matches the pattern, like 14-06-2022. - Doesn't match the pattern, like 14/06/2022 or 06-14-2022. 4. Indicate if you expect the test value to pass or fail the test. For example, if the test value: In the **Expected** field, select an option. - Matches the pattern, like 14-06-2022, select **Pass**. - Doesn't match the pattern, like 14/06/2022 or 06-14-2022, select **Fail**. 5. Test if the test values comply with the data pattern and if the expected result matches the actual result. If you click **Test**: If the actual result and the expected result: Click **Test**. - All test scenarios are tested. - The **Actual** field values are refreshed. - For each test scenario, the test result is shown. - 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. 11. Sub-task: Translate data pattern description and message. 1. You can translate both the validation message and the data pattern description into several languages. Click **Translations**. 2. Click **Add to open the drop** dialog. 3. In the list, find and select the desired language. 4. Click **OK**. 5. In the **Description** field, type the translation of the data pattern description. 6. In the **Validation message** field, type the translation of the validation message. > [!NOTE] > Note > > In the validation message translation, you can use these tags: > > - **Field name**: When the validation message is shown, the [Field name] tag is replaced with the name of the validated field. > - **Field value**: When the validation message is shown, the [Field value] tag is replaced with the value that is entered in the validated field. > > To add a tag to the validation message translation, click **Message** tags, and click the desired tag. 7. Close the page. 12. Close the page. > [!NOTE] > 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**. ### Examples Other examples of data patterns (regular expressions) are: - Check if an email address is correct: ^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|([a-zA-Z0-9]+[\w-]+\.)+[a-zA-Z]{1}[a-zA-Z0-9-]{1,23})$ - Check if a phone number starts with +: ^[+] ## Related - [Set up validation rule of type Data pattern](/set-up-validation-rule-of-type-data-pattern.md)