In the Events app, administrators have the option of applying their own custom validation requirements, or rules, to any standard or custom registration fields in the Contact Information or Attendee Information forms sections. This is done by creating a regular expression, or REGEX, that defines the acceptable format for a response in a given field. This will limit the values that can be input into a field.
For common examples of REGEX formats, check out Creating regular expression (REGEX) custom validation rules for Event registration fields.
To customize the field validation requirements for custom Salesforce fields in the Attendee Information section of an Event registration:
- Open the Event to which you wish to add your custom validation rule
- Click the Attendee Info tab
- Scroll down to the Custom Salesforce Fields section
- In the left column of the Custom Salesforce Fields table, click the edit icon for the field to which you wish to apply the validation rule
- In the modal popup, for the Expected Input Format parameter, select "Regular Expression"
- For the Regular Expression parameter that appears, enter the regular expression, e.g. REGEX, you wish to use to define the validation rule
- For the Custom Error Message parameter that appears, enter the error text you wish to appear if a visitor enters a value that does not conform to the regular expression
- Click Save in the modal
- Click Save in the main event edit view