Skip to main content

Validator

Short description

This section contains information on the functions and variables for designing the validators. Validators check the details customers enter before these are saved. As soon as the order process data is submitted, the relevant validator template is called. For example, if the invoice address is submitted, the template ValidatorCustomerInvoiceAddress is called. If the customer did not fill in any fields of the invoice address that were defined as mandatory in the template, the respective error messages are returned. The data is not saved while error messages are still returned.

Global Template Functions

  • AddError — Allows you to display an error message. All error messages are managed here: Setup » Client » Settings » Languages

  • ValidateMinimumBasketValue — Checks the minimum order quantity.

Templates

  • ValidatorCoupon — You can define checks for entering coupons in this template. This validator is called as soon as a coupon code is submitted.

  • ValidatorCustomerInvoiceAddress — You can define checks for the invoice address in this template. This validator is called when the invoice address is submitted during the order process.

  • ValidatorCustomerShippingAddress — You can define checks for the delivery address in this template. This validator is called when the delivery address is submitted during the order process.

  • ValidatorPlaceOrder — You can define checks for submitting the order in this template. For example, you can check if the terms and conditions or the cancellation rights were accepted by placing a check mark in the relevant check box.

  • ValidatorScheduler — You can define checks for submitting subscription settings in this template.

  • ValidatorShippingCountry — You can define checks for the country of delivery in this template. This validator is called when the country of delivery is submitted during the order process.

  • ValidatorShippingProfile — You can define checks for the shipping method in this template. This validator is called when the shipping method is submitted during the order process.

To top