top of page

  - FORMS -

Custom Validations

This example shows how forms can be validated using Regex or the custom validations API.

The Phone number is validated using the regex ^\([0-9]{3}\)-[0-9]{3}-[0-9]{4}$, which requires the phone number to take the format (555)-555-5555

The Email and Confirm Email inputs are validated using code, using the onCustomValidation API. 

onCustomValidation registers an event handler that is run when the element's validation is checked. 

In our case, we check that both the email and confirmation email match

A Form with Regex and Code Validations

Your Name:

First Name

Last Name

Your Phone:

Email

Title of the Reminder:

Details:

When to remind:

Your Email:

Phone

How to remind:

Using Email

Using SMS

At what time:

Email

Confirm Your Email:

Recurring

Title

When

Time

bottom of page