Add an analyzer test to an attribute
How to add and configure length, numeric, enum, regex, and not empty analyzer tests, and how to check a range.
To add an analyzer test to an attribute, take these steps:
Go to Export templates in the Developer Portal.
Use the search bar to find the export template where you need to add analyzer tests.
Select the needed export template to open the export template setup page:

In the section Attributes and analyzer tests, find the attribute and select its cell in the Analyzer tests column: Add analyzer test if the attribute has no analyzer tests yet, or the list of its analyzer tests. The Configure Analyzer Test pop-up opens.

In Select Test Type, choose the type of analyzer test, and set it up as described in the next sections:
Fill in the fields every analyzer test has. See Name, error message, and hint.
Select Save.
Your changes do not become available in the platform until you select Publish. See Publish export template changes.
Name, error message, and hint
Every analyzer test has these optional fields. Platform users see them in Data View when a value fails the test, so write them for the person who has to fix the data.
| Field | What to enter |
|---|---|
| Name | A short name for the analyzer test. |
| Error Message | What is wrong with the value, for example Title is longer than 150 characters. If you leave it empty, the Developer Portal saves Invalid Value as the error message. |
| Hint | How to fix the value, for example Shorten the title in your source data or with a rule box. |
Skip empty values
Length, numeric, enum, and regex pattern analyzer tests have the Skip empty values option:
- Yes — skip empty values: empty or missing values pass the test. Only values that exist are checked.
- No — check all values: empty values are checked too. Whether an empty value passes depends on the test:
| Test | With No — check all values, an empty value |
|---|---|
| Length validation | Counts as 0 characters. It passes at most 100 characters (<= 100) and fails at least 1 character (>= 1). |
| Numeric validation | Counts as 0. It passes >= 0 and fails > 0. |
| Enum validation | Fails with IN, because it is not one of the values. Passes with NOT IN. |
| Regex pattern validation | Fails with Must match pattern for most patterns, and passes with Must not match pattern. |
To require a value, add a Not empty validation test instead.
Length validation
Length validation is an analyzer test type that checks if the length of an alphanumeric value (a string) stays within a desired limit. These analyzer tests use the following operators: >, <, >=, <=, =, and !=.
For example, you can use length validation to make sure that:
- Title values do not exceed 100 characters.
- Description values are at least 70 characters long.
- SKU values are exactly 10 characters long.
To add a length validation analyzer test:
Take the steps at the top of this page to open the Configure Analyzer Test pop-up.
In Select Test Type, select Length Validation.

In Value, provide the number of characters that the analyzer test should check your values against.
In Operator, choose the condition that should be fulfilled for an attribute value to meet the length requirement:
- > means the attribute length should be greater than the provided number of characters.
- < means the attribute length should be less than the provided number of characters.
- >= means the attribute length should be greater than or equal to the provided number of characters.
- <= means the attribute length should be less than or equal to the provided number of characters.
- = means the attribute length should be exactly equal to the provided number of characters.
- != means the attribute value can be of any length but should not be equal to the provided number of characters.
Choose whether to skip empty values.
Once you set up the analyzer test, select Save.
Numeric validation
Numeric validation is an analyzer test type that compares attribute values to a desired number using such operators as >, <, >=, <=, =, and !=.
For example, you can use numeric validation to make sure that:
- Price values are equal to or greater than 0.
- Stock values are within a desired range.
- Rating values are between 1 and 5.
To add a numeric validation analyzer test:
Take the steps at the top of this page to open the Configure Analyzer Test pop-up.
In Select Test Type, select Numeric Validation.

In Value, provide the number that the analyzer test should compare your numeric values against.
In Operator, choose the condition that should be fulfilled for an attribute value to meet the requirement:
- > means the number in the attribute should be greater than the provided number.
- < means the number in the attribute should be less than the provided number.
- >= means the number in the attribute should be greater than or equal to the provided number.
- <= means the number in the attribute should be less than or equal to the provided number.
- = means the number in the attribute should exactly equal the provided number.
- != means the attribute can have any number, but it should not equal the provided number.
Choose whether to skip empty values.
Once you set up the analyzer test, select Save.
Check a range
One analyzer test compares a value with one number. To check that a value is within a range, add two analyzer tests to the same attribute: one for the lower limit and one for the upper limit. A value must pass both.
| You want | First analyzer test | Second analyzer test |
|---|---|---|
| Price between 0 and 999,999 | Numeric validation, >= 0 | Numeric validation, <= 999,999 |
| Rating between 1 and 5 | Numeric validation, >= 1 | Numeric validation, <= 5 |
| Title between 30 and 150 characters | Length validation, >= 30 | Length validation, <= 150 |
To add the second analyzer test, select Add Another Test at the bottom of the Configure Analyzer Test pop-up, set it up, and select Save.
Enum validation
Enum validation is an analyzer test type that compares attribute values to a list of pre-defined values and allows or blocks attribute values in case of matches. It is useful for attributes that should only contain a limited number of specific values.
For example, you can use enum validation to make sure that:
- Availability contains only in stock or out of stock values.
- Category does not contain names of discontinued categories.
- Color only contains values from a pre-defined list; for example, it should be blue instead of navy, indigo, or cobalt.
To add an enum validation analyzer test:
Take the steps at the top of this page to open the Configure Analyzer Test pop-up.
In Select Test Type, select Enum Validation.

In Allowed Values, enter the pre-defined values that the analyzer test should compare your attribute values to. You can enter them one by one, or paste several at once, separated by , or |. Duplicates are skipped.
In Operator, choose whether the provided pre-defined values should or should not be in the attribute values:
- IN means the attribute value should be one of the pre-defined values.
- NOT IN means the attribute value should not be one of the pre-defined values.
The entire value must match the pre-defined value, not only a part of it.
In Case Sensitive, choose whether you want your attribute values to exactly match the pre-defined values or if varying capitalization is acceptable. By default, enum validation is case-sensitive, so if an attribute value is In Stock, while the pre-defined value is in stock, the value fails the analyzer test.
Tip
If you do not want to toggle the Case Sensitive setting off, you can add all variants of spelling the needed value in Allowed Values. For example, in addition to in stock, you can add In Stock, IN STOCK, in Stock, etc.
Choose whether to skip empty values.
Once you set up the analyzer test, select Save.
Regex pattern validation
Regex pattern validation is an analyzer test type that scans attribute values and checks if they match a regular expression.
A regular expression (regex) is a sequence of characters that uses specific syntax or structure rules to define a search pattern. Using a regex, you can search your data for specific text pattern matches instead of exact text matches. For example, the regex /([A-Z])\w+/ finds and matches all words that start with an uppercase letter and are longer than 1 letter.
You can use regex pattern validation to make sure that:
- Date values follow the format DD-MM-YYYY.
- Product code values follow the format AAA-11111.
- Phone number values are valid and follow the needed format.
- Weight values use the needed format for numbers and units.
To add an analyzer test for regex pattern validation:
Take the steps at the top of this page to open the Configure Analyzer Test pop-up.
In Select Test Type, select Regex Pattern Validation.

In Pattern, enter the regular expression that defines a pattern you want to search for in your attribute values:
- You can enter the regex both with and without forward slashes:
([A-Z])\w+and/([A-Z])\w+/.
In Match behavior, choose Must match pattern if a value is valid when it matches the regex, or Must not match pattern if a value is valid when it does not match.
Choose whether to skip empty values.
Once you set up the analyzer test, select Save.
Not empty validation
Not empty validation is an analyzer test type that makes sure an attribute value is not empty or does not contain a null value.
For example, you can use this analyzer test type to make sure that optional attributes you rely on contain a value.
Mandatory and conditionally mandatory attributes get a Not empty test automatically. See Make attributes mandatory.
To add an analyzer test for not empty validation:
Take the steps at the top of this page to open the Configure Analyzer Test pop-up.
In Select Test Type, select Not Empty Validation.

Once you set up the analyzer test, select Save.
Add several analyzer tests to an attribute
An attribute can have several analyzer tests. Each test checks the value on its own, and a value must pass all of them. Each failed test shows its own error message in Data View.
| Scenario | Analyzer test setup |
|---|---|
| Price values should be between 0 and 999,999. | One numeric validation checks that the value is greater than or equal to 0. Another numeric validation checks that the value is less than or equal to 999,999. |
| Date values should not be empty and should follow the format YYYY-MM-DD. | One not empty validation checks that the value is not empty. One regex pattern validation checks that the value matches the regex ^\d{4}-\d{2}-\d{2}$. |
| Title values must be filled in and at most 150 characters long. | One not empty validation checks that the value is not empty. One length validation checks that the length is <= 150, with Skip empty values set to Yes, so an empty title fails only the not empty validation and shows one error instead of two. |
| Condition values must be new, used, or refurbished. | One not empty validation checks that the value is not empty. One enum validation with IN and the three values checks the value, with Skip empty values set to Yes for the same reason. |
| GTIN values can be empty, but a filled GTIN must have 8, 12, 13, or 14 digits. | One regex pattern validation with Must match pattern and the regex ^(\d{8}|\d{12,14})$, with Skip empty values set to Yes. There is no not empty validation, so an empty GTIN passes. |
To add another analyzer test:
At the bottom of the Configure Analyzer Test pop-up, select Add Another Test.
Set up the new analyzer test.
Tip
For your convenience, you can collapse the analyzer tests you are not working on by selecting them:

Select Save at the bottom of the pop-up.
Your changes do not become available in the platform until you select Publish. See Publish export template changes.
How is this guide?