How to validate the feed
Validating your product feed ensures that the data you publish to marketplaces or advertising platforms is correct, well-formed, and accepted without errors.
The module includes a built-in validation system that checks feed data against predefined validation rules.
Adding validation rules
You can customize and extend the default set of validation rules to match your store’s requirements or specific marketplace needs.
To add a new validation rule:
- Go to Catalog > Advanced Product Feeds > Feeds > Choose the feed > Content settings > Validation Rules (JSON)
- In the form, specify:
- Field Path (
field) – the XML path to the field in the feed, for example:
rss/channel/item/g:brand - Rules (
rules) – an array of validation rule objects.
Each rule must include the following fields:- Rule Type (
type) – e.g.required,max_length,is_one_of,start_with - Severity (
severity) – one of:error,warning,notice,improvement - Message (
message) – the text displayed in the validation report when the rule fails - Additional Parameters – optional, depending on the rule type (e.g.
length,values)
- Rule Type (
- Field Path (
Example: Validation rule syntax (JSON)
Validation rules are stored in JSON format and describe which fields to check, how to validate them, and how to display messages.
Each rule group defines a field and a list of rule objects applied to it.
Here’s a real-world example:
[
{
"field": "rss/channel/item/g:id",
"rules": [
{
"type": "required",
"severity": "error",
"message": "ID is a required attribute"
},
{
"type": "max_length",
"severity": "warning",
"message": "The maximum length of an ID is 50 characters",
"length": 50
},
{
"type": "unicode",
"severity": "warning",
"message": "Only valid unicode characters are allowed for IDs"
}
]
},
{
"field": "rss/channel/item/link",
"rules": [
{
"type": "required",
"severity": "error",
"message": "Link is a required attribute"
},
{
"type": "start_with",
"severity": "error",
"message": "A link should start with http or https",
"values": ["https://", "http://"]
}
]
},
{
"field": "rss/channel/item/g:price",
"rules": [
{
"type": "required",
"severity": "error",
"message": "Price is a required attribute"
}
]
}
]
Step-by-step validation process
-
Prepare the feed file
Ensure the feed is generated in the correct format (XML, CSV, or TXT) and uses UTF-8 encoding. -
Run validation automatically
If the validate after generation option is enabled inStores > Configuration > Advanced Product Feeds > Feed > General Settings, the feed will be validated automatically after each generation.Run validation manually
You can also manually trigger validation from the feed grid:- Select the feed > click Validate Feed in the toolbar.
- Wait for the validation process to complete.
- Open the feed Report to review the results.
-
Review validation results
Each message includes the field path, rule type, severity, and description.
Errors must be fixed before submitting your feed to external systems. -
Fix issues and revalidate
Adjust your product data or feed mapping configuration to correct issues.
Then re-generate and re-validate the feed. -
Publish or upload
Once the validation passes without errors, upload the feed to your desired marketplace.
Sample errors & resolutions
| Error / Warning | Meaning | How to Fix |
|---|---|---|
Missing required field: price | The price value is empty or missing | Ensure all products have a valid, non-zero price |
Invalid URL format for image_link | The image link doesn’t start with http or https | Update the URL or check for invalid characters |
Title exceeds maximum length (200 chars) | The product title is too long | Shorten the title to 150 characters or less |
Invalid condition value | Unsupported value for g:condition | Use one of the allowed values: new, refurbished, used |