I have this html;
<form action="" method="post" name="ApplyForm" id="ApplyForm" enctype="multipart/form-data">
<input type=text class="required"/>
<input type="submit" onclick="return validateForm()" class="submit" value="Submit Application" title="Submit application" />
and my script;
$(function () {
$("#ApplyForm").validate();
});
function validateForm() {
alert($(".email").valid());
return false;
}
So what's happening is if I alert out alert($("#ApplyForm").valid());
I always get true yet if I alert out the individual fields I get the expected results but the form still posts back;
this code works but I am unsure why the validate is not working on the form;
function validateForm() {
if ($(".required").valid() == 0)
return false;
else
return true;
}
I know this isn't much to go on but I'm hoping someone else has had this experiance and can tell me a solution.