Start Validating with regular expressions

Validating with regular expressions

When you are expecting dozens, or even hundreds, of responses in your Google Forms, it is always a good idea to have some rules in place and respondents data should be matched against these rules even before they submit the form.

This is to verify that I actually own that email address before my account is activated.

The email’s domain name must start with “A-Za-z0-9-“, follow by first level Tld (.com, .net) “.[A-Za-z0-9]” and optional follow by a second level Tld (au, my) “\\.[A-Za-z]”, where second level Tld must start with a dot “.” and length must equal or more than 2 characters.

Here’s a Java example to show you how to use regex to validate email address. [email protected], [email protected], [email protected] [email protected], [email protected], [email protected] 3.

You usually don't need to specify this option because by default, the constraint will convert the pattern given in the pattern option into an HTML5 compatible pattern. This option can be used to attach arbitrary domain-specific data to a constraint.