Validation Rules

This article describes how you can use validation rules to validate fields during order placement.

Overview

The purpose of this page is to explain how store validation rules can be applied throughout the front-end and back-end order placement processes such as:

  • Front-end Checkout
  • Front-end Basket Payments and Express Checkouts
  • Front-end Order Validate v1 API
  • Back-end New Order page

View Validation Rules

Validation rules are maintained on the Store > Validation Rules page, which also contains an overview of all validation rules already set up in Aurora e.g.

Rules can be maintained like other items in Aurora:

ItemDescription
Date CreatedThe date when the validation rule was initially created.
FieldSpecifies the field to be validated.
ScopesSpecifies the areas of Aurora within which the validation rule will be applied.
Edit IconEdit the respective validation rule.
Delete IconDelete the respective validation rule.

Add and Edit Validation Rules

New validation rules can be added by using the Add New Rule button.

Existing rules can be edited by selecting the Edit icon for the respective validation rule e.g.

The fields available when adding or editing a validation rules are described below:

NameDescriptionRequired
FieldThe field to which the validation rule should be applied.Yes
ScopesThe areas of Aurora within which to the validation rule will be applied.Yes
Min SizeThe minimum length of the field value.No
Max SizeThe maximum length of the field value.No
RegexThe regular expression to use when validating the field value.

Use the Examples button to see a list of predefined examples.
No
Match RegexMatch or Does not Match

Example:

Using a Regex so that only numerical values are matched e.g /^[0-9]*$/

If the field contains only numbers and Match is selected, validation will be successful.

However when using the Does not Match option selected, validation will fail.
No
Error MessageThe Site Text that will be used as the error message when validation fails.

A quick search dialog will be displayed when you start typing to help find the Site Text value to be used.
Yes
BehaviourContinue with default validation
Use custom validation first, then use the default validation in Aurora.

Override default validation
Use custom validation only.

Override default validation on error
Do not continue to default validation, when the custom rule causes an error.

Override default validation on success
Do not continue to default validation, when the custom rule is met.
Yes

Controlling Access to Validation Rules

User access to validation rules can be controlled by using the Validation Rules View, Add, Edit and Delete access rights within Users > Admin Users and Users > Identity Groups