I have created the CoOl javascript validation which provides you with an automated inline form validation using Document Object Model (DOM). The script has built-in checking of patterns such as email, date, alpha, text, number, decimal and url and regex. So the field you want to apply these patterns to should be a required field first.
In order to activate the validation for an element, all you have to do is to put the keyword required in the class attribute and also set the title of the element (which will appear in validation box) in the title attribute. Finally, just place return validateForm(‘myform’) in the onSubmit event of the form where myform is the id of the form being validated.
Have a look at the demo.
You can download it here.

Just and FYI, you regex for the email will not allow a valid extension of 4 characters, for example .museum
Thanks for letting me know about that. Of course the public at large can come up with the best improvement ideas and issues to be resolved. I hope to look into that soon. However, the code is pretty straight-forward to do such modifications. Thanks
good article.
thanks
Pingback: How to center a div generated dynamically? | Easy jQuery | Free Popular Tips Tricks Plugins API Javascript and Themes