Events Booking use jQuery Validation Engine for client side validation. If you setup Validation Rules for a field, as soon as you enter data for that field, the engine will validate the data you entered with the configured rules and if it's not valid, an error message will be shown to let you know about the error and correct it.
If you want to validate data of a custom field using this client validation feature, go to Events Booking -> Custom Fields, click on the custom field to edit, enter the rules you want to use into Validation Rules setting of that custom field. For example:
To help you configure it easier, the system tries to populate Validation Rules automatically base on two settings in custom fields:
Below are the list of validation rules which you can use to validate data of a custom field. For each field, you can use multiple validation rules, separate each rule by comma. See See https://github.com/posabsolute/jQuery-Validation-Engine?tab=readme-ov-file#validators for details documentation if needed, but the below explanation should be enough
Speaks for itself, fails if the element has no value. If you want to use this rule, just edit the field, set Required to Yes . When you do that, Events Booking will automatically insert required rule into Validation Rules setting of the field. For example, validate[required]
Use this rule to make sure data entered into the field is an integer value. To use this rule, set Data Type Validation of the field to Integer Number or insert custom[integer] manually to Validation Rules setting of the field. For example validate[required,custom[integer]]
Use this rule to make sure data entered into the field is an numeric value. To use this rule, set Data Type Validation of the field to Number or insert custom[number] manually to Validation Rules setting of the field. For example validate[required,custom[number]]
Use this rule to make sure data entered into the field is an email. To use this rule, set Data Type Validation of the field to Email or insert custom[email] manually to Validation Rules setting of the field. For example validate[custom[email]]
Use this rule to make sure data entered into the field is a url. To use this rule, set Data Type Validation of the field to URL or insert custom[url] manually to Validation Rules setting of the field. For example validate[required,custom[url]]
Use this rule to make sure data entered into the field is a phone number. To use this rule, set Data Type Validation of the field to Phone or insert custom[phone] manually to Validation Rules setting of the field. For example validate[required,custom[phone]]
Use this rule to make sure data entered into the field is a date. The date is validated base on format controlled in Date Picker Format config option. To use this rule, set Data Type Validation of the field to Date or insert custom[date] manually to Validation Rules setting of the field. For example validate[required,custom[date]]
Use this rule to make sure data entered into the field is is older than a pre-entered date. To use this rule, set Data Type Validation of the field to Past Date, then look at Validation Rules setting, change the pre-inserted date to the date you want. For example validate[custom[date],past[17/01/2025]]. You can also insert the rule manually into Validation Rules, for example past[17/01/2025], just please make sure the date (in this example 17/01/2025) must match the format configured in Date Picker Format config option.
Use this rule to make sure data entered into the field is is newer than a pre-entered date. To use this rule, set Data Type Validation of the field to Future Date, then look at Validation Rules setting, change the pre-inserted date to the date you want. For example validate[custom[date],future[17/01/2025]]. You can also insert the rule manually into Validation Rules, for example future[17/01/2025], just please make sure the date (in this example 17/01/2025) must match the format configured in Date Picker Format config option.
Use this rule to make sure data entered into the field is a v4 IP Address. To use this rule, set Data Type Validation of the field to Ipv4 or insert custom[ipv4] manually to Validation Rules setting of the field. For example validate[required,custom[ipv4]]
Use this rule to make sure data entered into the field is a v6 IP Address. To use this rule, set Data Type Validation of the field to Ip64 or insert custom[ipv6] manually to Validation Rules setting of the field. For example validate[required,custom[ipv6]]
Use this rule to make sure data entered into the field has minimum number of characters. To use this rule, set Data Type Validation of the field to Min Number Characters, then look at Validation Rules setting, change the pre-inserted size to the size you want. For example validate[required,minSize[6]]. You can also insert the rule manually into Validation Rules, for example minSize[6].
Use this rule to make sure data entered into the field has at least certain number of characters. To use this rule, set Data Type Validation of the field to Max Number Characters, then look at Validation Rules setting, change the pre-inserted size to the size you want. For example validate[required,maxSize[6]]. You can also insert the rule manually into Validation Rules, for example maxSize[6].
Use this rule to make sure data entered into the field must be greater than or equal certain integer value. To use this rule, set Data Type Validation of the field to Min Integer, then look at Validation Rules setting, change the pre-inserted number to the size you want. For example validate[required,min[6]]. You can also insert the rule manually into Validation Rules, for example min[6].
Use this rule to make sure data entered into the field must be smaller than or equal certain value. To use this rule, set Data Type Validation of the field to Max Integer, then look at Validation Rules setting, change the pre-inserted number to the size you want. For example validate[required,max[6]]. You can also insert the rule manually into Validation Rules, for example max[6].
Use this rule to make sure users need to select minimum number of options in a Checkboxes custom field. To use this rule, set Data Type Validation of the field to Min Selected Checkboxes, then look at Validation Rules setting, change the pre-inserted number to the size you want. For example validate[minCheckbox[2]]. You can also insert the rule manually into Validation Rules, for example minCheckbox[2].
Use this rule to make sure users need to select minimum number of options in a Checkboxes custom field. To use this rule, set Data Type Validation of the field to Max Selected Checkboxes, then look at Validation Rules setting, change the pre-inserted number to the size you want. For example validate[maxCheckbox[2]]. You can also insert the rule manually into Validation Rules, for example maxCheckbox[2].
Use this rule to make sure data entered into the field is contains only number and space characters. To use this rule, set Data Type Validation of the field to Only Number and Space characters or insert custom[onlyNumberSp] manually to Validation Rules setting of the field. For example validate[required,custom[onlyNumberSp]]
Use this rule to make sure data entered into the field is contains only number and space characters. To use this rule, set Data Type Validation of the field to Only Letter and Space characters or insert custom[onlyLetterSp] manually to Validation Rules setting of the field. For example validate[required,custom[onlyLetterSp]]
Use this rule to make sure data entered into the field is contains only number and space characters. To use this rule, set Data Type Validation of the field to Only Letter and Number characters, No Space or insert custom[onlyLetterNumber] manually to Validation Rules setting of the field. For example validate[required,custom[onlyLetterNumber]]