Skip to main content

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:

  1. Go to Catalog > Advanced Product Feeds > Feeds > Choose the feed > Content settings > Validation Rules (JSON)
  2. 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)

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

  1. Prepare the feed file
    Ensure the feed is generated in the correct format (XML, CSV, or TXT) and uses UTF-8 encoding.

  2. Run validation automatically
    If the validate after generation option is enabled in Stores > 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.
  3. 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.

  4. Fix issues and revalidate
    Adjust your product data or feed mapping configuration to correct issues.
    Then re-generate and re-validate the feed.

  5. Publish or upload
    Once the validation passes without errors, upload the feed to your desired marketplace.

Sample errors & resolutions

Error / WarningMeaningHow to Fix
Missing required field: priceThe price value is empty or missingEnsure all products have a valid, non-zero price
Invalid URL format for image_linkThe image link doesn’t start with http or httpsUpdate the URL or check for invalid characters
Title exceeds maximum length (200 chars)The product title is too longShorten the title to 150 characters or less
Invalid condition valueUnsupported value for g:conditionUse one of the allowed values: new, refurbished, used