I have been trying to get these two plugins playing well all day. Currently if you hit submit, it will submit the empty form, and if you hit it again, it will validate (and not submit). I feel I am missing something obvious.
$(document).ready(function() {
$('#form_contact').submit(function() {
return false;
});
$('#uploader').ajaxForm({
success: showResponse
});
$('#form_contact').ajaxForm({
beforeSubmit: showValid,
success: showResponse
});
function showResponse(responseText, statusText) {
$("#result").html((responseText));
}
function showValid() {
var valid = $("#form_contact").validate();
if ( valid.numberOfInvalids( ) )
return false;
else
return true;
}
});