In forms when using email ID fields it is a good idea to use client side validation along with your programming language validation.
The following example shows how you can validate an email address for a form.
In other words, in order to validate a field, you just associate a set of validation descriptors for each input field in the form. For such cases, a function is included which clears all validations in the validator object. Note that this validation if for fields like Textbox and multi-line text box.
But keep in mind that one should not rely only upon Java Script validation. This should be validated on the server side as well.
While it's fine to check the format of an email address client-side using a regex, the only way to really, totally, be sure that an email address exists is to confirm that you can send email to it, and that somebody can receive it.
Unfortunately, it's not possible to send an email directly from the browser without outside help.
Each field in the form can have zero one or more validations. More info & downloads where Do My Validation One() and Do My Validation Two() are custom functions for validation.
For example, you can have an input field that should not be empty, should be less than 25 chars and should be alpha-numeric. In some dynamically programmed pages, it may be required to change the validations in the form at run time.
a "personal_info" and a domain, that is [email protected] The length of the personal_info part may be up to 64 characters long and domain name may be up to 253 characters. You can modify or rewrite the said regular expression.