you can use something like this...
function validateEmail(emailField){
var reg = /^([a-z0-9_\-\.]+)@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/;
if (reg.test(emailField.value) == false)
{
alert('Invalid Email Address');
return false;
}
return true;
}
if you need to omit the capital letters then just remove
A-Z
from your expression, and you need to allow both the letters capital as well as lower then use some thing like this,
A-Za-z
like above expression is modified to allow only lower letters, if we need to allow only capital then the expression is something like this...
Only Capital
^([A-Z0-9_\-\.]+)@[A-Z0-9-]+(\.[A-Z0-9-]+)*(\.[A-Z]{2,3})$
Both
^([A-Za-z0-9_\-\.]+)@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,3})$