Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your code is not working reliably because your custom <code>submit</code> handler is interfering with the <code>submitHandler</code> already built into the plugin. </p> <p><a href="http://jqueryvalidation.org/validate/" rel="nofollow">http://jqueryvalidation.org/validate/</a></p> <blockquote> <p>submitHandler (default: native form submit)<br> Type: Function()<br> Callback for handling the actual submit when the form is valid. Gets the form as the only argument. <strong>Replaces the default submit.</strong> The right place to submit a form via Ajax after it validated.</p> </blockquote> <p>You would never need to write your own <code>submit</code> handler when using this plugin. For reliability, just use the plugin's <code>submitHandler</code> callback function.</p> <pre><code>$(document).ready(function() { $('#myform').validate({ // initialize the plugin on your form // rules and/or options, submitHandler: function(form) { // this callback function will only fire on a valid form // disable submit button // etc. } }); }); </code></pre> <p><strong>DEMO</strong>: <a href="http://jsfiddle.net/zArRK/" rel="nofollow">http://jsfiddle.net/zArRK/</a></p> <p>Remember, <code>.validate()</code> is the <em>initialization</em> method for the plugin and must be called once on DOM ready. It is not the method you call for "testing" the form. Testing the form is done automatically by the plugin whenever certain built-in events are triggered. You would call <code>.valid()</code> to programatically test the form, but <code>.valid</code> is not needed, for this case, as you can see by the demo.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload