Validation completed event - mosbymc/validator GitHub Wiki

After validation has completed on a form or input, regardless of the status, a validation event is fired to notify the developer that validation has finished. The event is attached on the document and contains data on which form/input was validated, whether the form/input passed or failed validation, and the number of failed inputs.

To use the validation completed event, set up a listener for an event of type "validated" on the document. In the HTML file included with this repository, I am listening for the validation event like so:

    $(document).on("validated", function(e, eventData) {
       if (eventData.element === "fieldValidate3") {
          alert(eventData.element + " finished validation." + 
          "\nPassed: " + eventData.passed + 
          "\nNumber of failed inputs: " + eventData.succeeded);
          validator().validationHook("fieldValidate5");
       }
    });

Continue to: Public validation hook