Though this solution may be simple, I'm sure this is one of those useful things that people will be Googling for and deserves its own entry on the site If only Google would be the first place to look :) Just look at the duplicates of this closed every some time.
Any support for use of regex checks for e-mails I am 100% against.
To start, we create a text field and bring up the properties dialog for the field.
Then we select the “Validate” tab to see the validation options: The default is that the field will not get validated.
Explain to your user what is wrong and suggest solutions.
Here's an example of the above in action: Almost all answers to this questions suggest using Regex to validate emails addresses.
I think Regex is only good for a rudimentary validation.
For numeric fields, there is a convenient way to validate a value range, but we want to select to run a custom validation script.
After the “Edit” button is clicked, a new window will open that allows us to edit the new script: This script also includes a check for an empty string, so that the user can wipe out a wrong string and start from scratch.
Verimail keeps validating on keyup, which means, as soon as you start typing, you get an error message.