Another brute force approach I've tried follows:

        var checkForm = function() {
            if ( validator.checkForm() ) {
                // disable button
            } else {
               // enable button
            }
            return true;
        };

        $('#myForm').keyup(checkForm).change(checkForm).blur
(checkForm);

But while this is a bit better than polling, it still leaves me with
the undesirable side effect of displaying error messages on fields as
soon as the user clicks on 'em.

If checkForm() could be made public and then have it take an optional
boolean to suppress the error messaging, that would be one way to get
this to work...but having a simple callback option for validate()
would be even better:

      $('#myForm').validate({
          noErrorsHandler: function(validator) {
              // yadda, yadda, yadda
          }

-dan

Reply via email to