I am trying to validate an email address to make sure its correct. e.g Includes "@" symbol. What do I add to my existing code?
Here is my code for the email address with other inputs in the form:
$(".next").click(function(){
//text inputs
if(!document.getElementById('fullname').value) {
alert('Full Name is required');
return false;
}
else if(!document.getElementById('email').value) {
alert('Email is required');
return false;
}
else if(!document.getElementById('phone').value) {
alert('Phone Number is required');
return false;
}
else if(!document.getElementById('age').value) {
alert('Age is required');
return false;
}