Discount Validator
Validates that discounts on the cart are correctly configured.
Overview
The Discount Validator checks that all discounts applied to the cart have a consistent configuration. Specifically, it flags any discount that has a RewardType of None but still has a discount value greater than zero, which indicates a misconfiguration.
Identifier
| Property | Value |
|---|---|
| Connector ID | discountValidator |
| Validation Type | Discount |
Behavior
- Iterates through all discounts on the cart's order form
- For each discount, checks if the
RewardTypeisNoneand theDiscountValueis greater than zero - If any such discount is found, returns a validation error
Error messages
| Condition | Message |
|---|---|
| Discount has value but reward type is None | "Discount has value, but discount reward type is 'None'" |
Configuration
No additional properties required.
