Prevent Invalid Data in Mandatory Fields

Registration form data plays a crucial role in helping you collect key information about event registrants. Besides standard fields like First and Last Name and Email, you can also include other mandatory fields like Company Name, Job Title, Country, etc., to gather additional data about your registrants. 

However, there might be situations where registrants fill in random characters like “-” or “*” in these fields instead of keying in the correct values. This is where Regular Expression Patterns come to your rescue. 

Regular Expression Pattern (Regex)

Regex (Regular Expression) is a sequence of characters that is used for pattern matching within strings. You can use it to validate whether the text the user has entered in an input field on the registration form matches your parameters. 

Example: Set up a regex pattern to check if the registrant has entered only alphabetic values for the Company Name field. 

  1. Login to Goldcast Studio, select your preferred event and navigate to the Registration → Page & Form tab using the left sidebar. 
  2. Click the Edit button in the Registration Form section to open the Registration Form Builder. 
  3. Click the Edit icon next to your desired component, like the Company Name field. 
  4. Navigate to the Validate tab and choose Blur in the Validate On dropdown. Select the Required checkbox
  5. In the Regular Expression Pattern field, copy-paste this expression:

    ^[a-zA-Z]+$

    This pattern ensures that only letters (both lower and uppercase) are allowed in the input for the component. If there are any other characters, the match will fail. The Submit button on the Registration Form will be enabled only when the user enters alphabets in the Company Name field. 
     
  6. Use the Custom Error Message field to enter the error you want to display if the user enters a wrong input. 
  7. Click Update and click Save
    1716899511708-2f20d2bc-218f-49d2-badf-dee63ff9f148 (960×400)

Another example of using regex patterns is to limit registrations to certain email domains. To learn more, refer to our guide on Creating and Editing Registration Forms.

© 2024 Copyright Goldcast, Inc. All rights reserved.


Knowledge Base Software powered by Helpjuice