I\'m new to jQuery and was wondering how to use it to validate email addresses.
A simplified one I've just made, does what I need it to. Have limited it to just alphanumeric, period, underscore and @.
function testEmailChars(el){
var email = $(el).val();
if ( /^[a-zA-Z0-9_@.-]+$/.test(email)==true ){
$("#a").html("valid");
} else {
$("#a").html("not valid");
}
}
Made with help from others