I have a form with a dozen email input fields and each email needs to be unique. What is the most elegant way via jquery to perform the comparison among all the fields without manually writing all the comparisons like below:
if($("#email1").val() == $("#email2").val() || ....) {
isValid = false;
alert("emails must be unique.");
}
Thanks in advance!