Using validate.js for validation, but what about submission?
===

I am using [validate.js][1] to validate my form with jQuery. If there is an error, an error message pops up when the user clicks on the submit button. When the user fills out the form and there are no validation errors, the form does not submit, but rather shows a validation success message (the user passed  validation) but the form does not submit (or take action).

Below is the part of my jQuery that creates these messages:

    function(errors, event) {
        var SELECTOR_ERRORS = $('.error_box'),
        SELECTOR_SUCCESS = $('.success_box');
    
        if (errors.length > 0) {
            SELECTOR_ERRORS.empty();
            
            for (var i = 0, errorLength = errors.length; i < errorLength; i++) {
                SELECTOR_ERRORS.append(errors[i].message + '<br />');
            }
            
            SELECTOR_SUCCESS.css({ display: 'none' });
            SELECTOR_ERRORS.fadeIn(200);
    
            } else {
                 SELECTOR_ERRORS.css({ display: 'none' });
                 SELECTOR_SUCCESS.fadeIn(200);
                            
            }

So as you can see, when there are no errors, `SELECTOR_SUCCESS` fades in. I would like to submit the form if there are no errors, not display any messaging. I can easily get rid of the messaging by removing the one line (`SELECTOR_SUCCESS.fadeIn(200);`), but I also need the form to submit as a replacement. What is a the best practice for a situation like this??


  [1]: http://rickharrison.github.com/validate.js/