I have a shop where the field EcomOrderVoucherCode is used.
I can't seem to get validation errors to work for this field.
The following has been set up:
- A validation group has been created for Voucher code with rule "Is Valid"
- In the settings for the checkout module I have added the field for validation. The error message is set to "error"
- In my front-end I have the voucher code working (attached to a discount type)
- In the template I use the following code: <input class="<!--@Ecom:Cart.ValidationError.EcomOrderVoucherCode.ErrorMessage-->" type="text" name="EcomOrderVoucherCode" id="EcomOrderVoucherCode" value="<!--@Ecom:Order.Customer.VoucherCode-->" />
On inspecting the TemplateTags output i can see that the value for <!--@Ecom:Cart.ValidationError.EcomOrderVoucherCode.ErrorMessage--> is nothing. Whereas other input fields render "error" (if there is an error).
What am I missing?