I want to write an if statement that will check if two fields are empty and to check that one of them is an email address, how do I check email is a valid email address?
var fullname = $("#name").val();
var emailAddress = $("#email").val();
if (fullname.length > 0 && emailAddress.val().length > 0 && emailAddress IS EMAIL)
{
//Do somehting
}