jQuery: .validate() function and Submit Once Function
<p>I have this snippet of code to Submit a form once, to prevent multiple database inserts: </p>

<pre><code>        // Validates the form data
        // Running before submit, otherwise HTTP process starts and we POST
        $(".empForm").validate();
        // Setting the submit button to enabled
        $("input[type='submit']").attr("disabled", false);
        // disabling the submit button after it's been pressed atleast once
        // Prevents duplicate entries in the database
        $(".empForm").submit(function(){
            // if it's valid, lock the submit button 
            // if the form is not valid, they can complete and try again
            if($(".empForm").valid()){
              $("input[type='submit']").attr("disabled", true).val("Please wait...");
              return true;
            }// closes if
        }); //closes submit
</code></pre>

<p>The problem is I use the .validate() function of jQuery and when the form comes back as missing fields, I cannot submit the form because it's disabled. Any suggestions? </p>
