bootstrap-validator icon indicating copy to clipboard operation
bootstrap-validator copied to clipboard

Event trigger for the whole form Validated

Open macedd opened this issue 9 years ago • 4 comments

It is not possible to determine when the form was fully validated. This simple patch manage to trigger an event after all fields are validated.

fix #69 and closes #116

macedd avatar Apr 28 '15 20:04 macedd

Trigger events is what validate do. https://github.com/1000hz/bootstrap-validator/issues/116#issuecomment-97195155 This is an async approach, and a reliable way to look for errors in a form, programmatically, is simple to achieve with jquery's when

macedd avatar May 19 '15 09:05 macedd

Example Usage

$('.form-element').on('form.validated.bs.validator', function() {
    var validator = $(this).data('bs.validator');
    if (!validator.hasErrors())
     console.log('No errors found');
    else
     console.log('Some errors present');
});

macedd avatar May 19 '15 09:05 macedd

This looks great @thiagof. Exactly what I was looking for.

Thank you very much.

ferrod20 avatar Sep 08 '15 23:09 ferrod20

I'm becoming crazy about these race conditions on each input validation. I need this.

@1000hz, Please...

devgnx avatar Sep 05 '17 17:09 devgnx