form submit using ajax after validation using jquery validation plugin?
<p>Im using jquery plugin for validation and im using the ajax for submitting the form i need to submit the form after the successfull validation but the form get submitted even though the validation occurs i have tried the following code but here the both validation and form submission gets occurs at same time.</p>

<pre><code>&lt;form class="form-horizontal cascade-forms"  name="signup_form" id="signup_form" novalidate="novalidate" style="background:#f9f9f9;"&gt;
    &lt;input type="hidden" name="action" id="action" value="create" /&gt;
        &lt;div class="form-group"&gt;
            &lt;label class="col-lg-2 col-md-3 control-label"&gt;Username&lt;/label&gt;
            &lt;div class="col-lg-10 col-md-9"&gt;
                &lt;input type="text" class="form-control form-cascade-control input-small" name="username" id="username"&gt;
                &lt;input type="hidden" class="form-control form-cascade-control input-small" name="teacher_id" value="&lt;?php echo $_SESSION['user_id']; ?&gt;"  &gt;
            &lt;/div&gt;
        &lt;/div&gt;

       &lt;div class="form-group"&gt;
            &lt;label class="col-lg-2 col-md-3 control-label"&gt;Gender&lt;/label&gt;
            &lt;div class="col-lg-10 col-md-9"&gt;
                &lt;label&gt;&lt;input type="radio" name="gender" value="male" checked&gt;Male&lt;/label&gt;
                &lt;label&gt;&lt;input type="radio" name="gender" value="female"&gt;Female&lt;/label&gt;
            &lt;/div&gt;
        &lt;/div&gt;

     &lt;div class="form-group"&gt;
    &lt;label class="col-lg-2 col-md-3 control-label"&gt;User Role&lt;/label&gt;
    &lt;div class="col-lg-10 col-md-9"&gt;
        &lt;select name="user_role" id="user_role" class="form-control" onChange="hide(); " required&gt;
            &lt;option  value=""&gt;Select Role&lt;/option&gt;
             &lt;?php if($_SESSION['role'] == 1 ) { ?&gt;
            &lt;option value="0"&gt;Student&lt;/option&gt;
            &lt;?php } ?&gt;
            &lt;?php if($_SESSION['role'] == 4) { ?&gt;
            &lt;option value="1"&gt;Teacher&lt;/option&gt;
            &lt;?php } ?&gt;

        &lt;/select&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;form class="form-horizontal cascade-forms"  name="signup_form" id="signup_form" novalidate="novalidate" style="background:#f9f9f9;"&gt;
    &lt;input type="hidden" name="action" id="action" value="create" /&gt;
        &lt;div class="form-group"&gt;
            &lt;label class="col-lg-2 col-md-3 control-label"&gt;Username&lt;/label&gt;
            &lt;div class="col-lg-10 col-md-9"&gt;
                &lt;input type="text" class="form-control form-cascade-control input-small" name="username" id="username"&gt;
                &lt;input type="hidden" class="form-control form-cascade-control input-small" name="teacher_id" value="&lt;?php echo $_SESSION['user_id']; ?&gt;"  &gt;
            &lt;/div&gt;
        &lt;/div&gt;

       &lt;div class="form-group"&gt;
            &lt;label class="col-lg-2 col-md-3 control-label"&gt;Gender&lt;/label&gt;
            &lt;div class="col-lg-10 col-md-9"&gt;
                &lt;label&gt;&lt;input type="radio" name="gender" value="male" checked&gt;Male&lt;/label&gt;
                &lt;label&gt;&lt;input type="radio" name="gender" value="female"&gt;Female&lt;/label&gt;
            &lt;/div&gt;
        &lt;/div&gt;

     &lt;div class="form-group"&gt;
    &lt;label class="col-lg-2 col-md-3 control-label"&gt;User Role&lt;/label&gt;
    &lt;div class="col-lg-10 col-md-9"&gt;
        &lt;select name="user_role" id="user_role" class="form-control" onChange="hide(); " required&gt;
            &lt;option  value=""&gt;Select Role&lt;/option&gt;
             &lt;?php if($_SESSION['role'] == 1 ) { ?&gt;
            &lt;option value="0"&gt;Student&lt;/option&gt;
            &lt;?php } ?&gt;
            &lt;?php if($_SESSION['role'] == 4) { ?&gt;
            &lt;option value="1"&gt;Teacher&lt;/option&gt;
            &lt;?php } ?&gt;

        &lt;/select&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group"&gt;
&lt;label class="col-lg-2 col-md-3 control-label"&gt;Department&lt;/label&gt;
&lt;div class="col-lg-10 col-md-9"&gt;
    &lt;select name="dept" id="id_dept" class="form-control" required&gt;
        &lt;option value=""&gt;Select Department&lt;/option&gt;
        &lt;option value="1"&gt;EE/EC &lt;/option&gt;
        &lt;option value="2"&gt;CS&lt;/option&gt;
        &lt;option value="3"&gt;ME&lt;/option&gt;
        &lt;option value="4"&gt;Civil&lt;/option&gt;
        &lt;option value="5"&gt;Math&lt;/option&gt;
        &lt;option value="6"&gt;Chemical&lt;/option&gt;
        &lt;option value="7"&gt;Common&lt;/option&gt;
        &lt;option value="8"&gt;MME&lt;/option&gt;
         &lt;option value="9"&gt;ED&lt;/option&gt;
&lt;/select&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="form-group"&gt;
&lt;label class="col-lg-2 col-md-3 control-label"&gt;Semester&lt;/label&gt;
&lt;div class="col-lg-10 col-md-9"&gt;
    &lt;select name="sem" id="id_sem" class="form-control" required&gt;
        &lt;option value=""&gt;Select Semester&lt;/option&gt;
        &lt;option value="1"&gt;1&lt;/option&gt;
        &lt;option value="2"&gt;2&lt;/option&gt;
        &lt;option value="3"&gt;3&lt;/option&gt;
        &lt;option value="4"&gt;4&lt;/option&gt;
        &lt;option value="5"&gt;5&lt;/option&gt;
        &lt;option value="6"&gt;6&lt;/option&gt;
        &lt;option value="7"&gt;7&lt;/option&gt;
        &lt;option value="8"&gt;8&lt;/option&gt;
    &lt;/select&gt;
&lt;/div&gt;
&lt;/div&gt;
  &lt;div class="form-group"&gt;
        &lt;label class="col-lg-2 col-md-3 control-label"&gt;Name&lt;/label&gt;
        &lt;div class="col-lg-10 col-md-9"&gt;
            &lt;input type="text" class="form-control form-cascade-control input-small" name="firstname" id="firstname" &gt;
            &lt;p id="student_en"style=" font-size: 13px;color: red;padding: 5px;display:none" &gt; Please ensure the student name  as per certificate &lt;/p&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="form-group" style="display:none;"&gt;
        &lt;label class="col-lg-2 col-md-3 control-label"&gt;Last Name&lt;/label&gt;
        &lt;div class="col-lg-10 col-md-9"&gt;
            &lt;input type="text" class="form-control form-cascade-control input-small" name="lastname" id="lastname" &gt;
        &lt;/div&gt;
    &lt;/div&gt;

     &lt;div class="form-group" id="mob_form" style="display:none"&gt;
    &lt;label class="col-lg-2 col-md-3 control-label"&gt;Mobile&lt;/label&gt;
    &lt;div class="col-lg-10 col-md-9"&gt;
        &lt;input type="text" class="form-control form-cascade-control input-small" name="mobile" id="mobile"&gt;
    &lt;/div&gt;
&lt;/div&gt;

    &lt;div class="form-group"&gt;
        &lt;label class="col-lg-2 col-md-3 control-label"&gt;Email&lt;/label&gt;
        &lt;div class="col-lg-10 col-md-9"&gt;
            &lt;input type="text" class="form-control form-cascade-control input-small" name="email" id="email" maxlength="50"&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="form-actions"&gt;
        &lt;input type="submit" id="usersubmit" value="Submit" class="btn bg-success text-white btn-lg"&gt;
          &lt;input type="reset" value="Reset" class="btn bg-danger text-white btn-lg"&gt;
    &lt;/div&gt;
&lt;/form&gt; 
</code></pre>

<p>JS:</p>

<pre><code>$(document).ready(function(){

$("#signup_form").validate({
        rules:{
            required:{
                required:true
            },
            user_role:{
                required:true
            },
            username:{
                required:true,
                alphanum:true,
                minlength: 5,
                maxlength: 30
            },
            firstname:{
                required:true,
                alphacustom:true,
                minlength: 5,
                maxlength: 75
            },
            lastname:{
                required:true,
                alphanum:true,
                minlength: 1,
                maxlength: 30
            },
             email: {
                required: true,
                email: true
            },
             mobile: {
                required: true,
                number: true,
                minnumber: 10,
                maxnumber: 10
            },

        },
        errorClass: "help-inline text-danger",
        errorElement: "span",
        highlight:function(element, errorClass, validClass) {
            $(element).parents('.form-group').addClass('has-error');
        },
        unhighlight: function(element, errorClass, validClass) {
            $(element).parents('.form-group').removeClass('has-error');
            $(element).parents('.form-group').addClass('has-success');
        }
    });

        $('#signup_form').submit(function(e){

            e.preventDefault();

            $.ajax({
                type: 'post',
                url: 'submit.php',
                data: $('form').serialize(),
                success: function () {

                    alert("submitted");

                }
            });
            return false;
        });

    });
</code></pre>