How can I add my own custom validation rules to booking form fields

You should include validation rules on your booking form fields to ensure you collect the best quality data possible. Read about the standard validation rules included out of the box with EventHQ here.

You may wish to add your own validation rules to ensure data quality. For example if you require attendees claiming discounted "member only" tickets enter their membership number, you could add a validation rule that checks the membership number looks valid.

Settings / Validation Rules

Settings / Validation Rules

Click the "Create new rule" button

Click the "Create new rule" button

Enter your validation rule details

ImportantCustom validation rules require a degree of knowledge about regular expressions. Some references are provided within EventHQ, but if you are in any doubt, please contact support who will be very happy to help build your regular expression

Describe the validation rule

The name and description are for internal use only and will not be seen by attendees. The error message is the text you want shown to attendees if the validation rule is triggered. Your error message should describe the problem in sufficient detail for the attendee to know how to fix the error. For example "your membership number is wrong, please try again" is not very helpful whereas "your membership number format is wrong, please ensure it starts with two uppercase letters, then a hyphen and then six digits" is much better.

Describe the validation rule

Enter the regular expression to use for validation

  1. Pattern to match should be a full regular expression including the delimiters and any flags like i or g
  2. To help test your pattern works, please enter an example which matches your regular expression in the matching example field
  3. To help test your pattern works, please enter an example which does not match your regular expression in the matching example field
Enter the regular expression to use for validation

Select which input types this rule can be applied to

To help keep the user interface as clean and uncluttered as possible, please indicate which input types your new validation rule can be applied to. For example, if it cannot be applied to a date field, then untick the date field in this list

Select which input types this rule can be applied to

Click the "save changes" button to save your new validation rule

Your new rule will be listed in the validation rules section. You can create as many validation rules as you wish.

Click the "save changes" button to save your new validation rule

To edit an existing validation rule, click it's name and make the necessary changes

To edit an existing validation rule, click it's name and make the necessary changes

To delete an existing validation rule, click the trash icon to the right of the rule

To delete an existing validation rule, click the trash icon to the right of the rule

Confirm you really want to delete the rule

Confirm you really want to delete the rule

Still need help? Contact Us Contact Us