Last element in .each() set
I have an issue, where by I am doing a simple form validation, that needs some custom stuff that the validation plugin could not do for me. Basically, I have a name, email and message field, all are required, but only email is really validated, the others just need to check if theyre not empty. Here is my current code: $("#contactMe form").submit(function() { var email = $('.requiredEmail').val(); if(email != 0) { if(isValidEmailAddress(email)) { $('.requiredText').each(function() { thisVal = $(this).val(); var $this = $(this); if(thisVal != 0) { console.log('Valid Field: '+thisVal); if ($