Using ajaxForm and jquery.validate

Using ajaxForm and jquery.validate

Hi all,

i would like to use validation plugin with ajaxForm submit as shown bellow. I need to show/hide side divs based on form validation result(in showRequest method).
What is happening is that the form validation is executed 2 times, 1st in showRequest method and second invoked automatically befor ajax submit

CODE
var options = {
    beforeSubmit:  showRequest,     // pre-submit callback
    success:       showResponse,    // post-submit
    type:  'post',                  // 'get' or 'post', override for form's 'method' attribute
    data: 'json',
    clearForm: true,                // clear all form fields after successful submit
    resetForm: true                 // reset the form after successful submit
};

$('#formId').ajaxForm(options);

function showRequest(formData, jqForm, options) {
    var valid = jqForm.validate().form();
   
    if(valid){
        $('#formLoadingDiv').toggle();
        $('#formDiv').toggle();
    }
    return valid;
}

function showResponse(responseText, statusText)  {
    $('#formLoadingDiv').toggle();
    $('#someOtherDiv').toggle();
}