Field Validation for non Ticketed Event Registration Form

Hi -
I am the web master for a Community Chorus. We started using Wix Events to capture roster information for our Fall and Spring session. This has been working great, with the exception that the data in some of the fields gets a little out of hand. For example, I ask for height in inches (so the choir director is better able to place us on stage), and instead of getting 69 for a value, I get 5-9, 5 9, 5’9, 5’9", … the list goes on! I would really like to add some very simple validation to the Height field, and also the Phone number field to make my data more uniform when I export it to Excel. I would really like to enforce something like the following regular expressions for theseL
Height: /^\d+$/gm
Phone:
/^(\d{3})\d{3}-\d{4}$/gm
or
/^\d{3}-\d{3}-\d{4}$/gm

It should be failrly simple code, just not sure where to place it. I am checking the option to use: ’ Wix Events registration page’. Is it even possible to code some validation logic into this form?? If so, where woujld I put it? Or would I need to create a separate page with a form to handle the registration. I will the registration mechanism is nice, I basically just created one event, then cloned it each time I needed to make a new one, now, I clone the previous fall event for the new fall event, and the previous spring event for the next spring one, without having to reinvent the new one! I do wish in the text, I could include variables. so I could basically have ${year}. or ${startdate}… then I could just update the variables amd not have to look around for all the new dates!!! Invariably I miss one or two!.

Anyway, I would really like to do that field validation! Is it possible, and how can I do it?

Thanks!!!
Mike

You can accomplish field validation through setting a Pattern Validation on a particular element by clicking ‘Settings’ in the editor.

It is also possible to accomplish this through Velo using Custom Validations .

I’ve attached some useful resources below:
Custom Validations Example Project

Hi Thomas -

Thanks for the reply! Sorry for the delay in responding, have been busy with work…

So, I have been using the inbuilt event registration form, that is:

Which brings me to a form that I can add a limited types of fields (add more options):


I don’t see a general number field (that would validate against a number,) so I just select custom, and then create a field called What is your Height in Inches? For response type, the closet response type I see is Short Text:

Aside from that, the only validation I see is to make required:

In your post you mention validations, the only place I see that is in Wix Forms - I don’t see a way to do it with this type of ‘Event Registration Form’. So, if I want to do these type of validations (numbers, etc.) do I need to create a custom page, use Wix Forms to create the form and then use this option:


Is the only option to do validations? And then put code (dev mode) to submit the form and send info to the guest list, etc. I really don’t see any way to validate in the inbulit page, nor do I see any way to access the coding area for it, since I would be creating the vent via the dashboard and not via the website editor.

Thanks again!!
Mike