bootstrap-validator
bootstrap-validator copied to clipboard
Event trigger for the whole form Validated
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
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
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');
});
This looks great @thiagof. Exactly what I was looking for.
Thank you very much.
I'm becoming crazy about these race conditions on each input validation. I need this.
@1000hz, Please...