Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Event trigger for the whole form Validated #120

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Event trigger for the whole form Validated
This could fix #69 and closes #116
  • Loading branch information
macedd committed Apr 28, 2015
commit 0e1637be8224690d4e9f406c13ac2e9761b52050
7 changes: 6 additions & 1 deletion js/validator.js
Original file line number Diff line number Diff line change
@@ -160,10 +160,15 @@
}

Validator.prototype.validate = function () {
var self = this
var delay = this.options.delay

this.options.delay = 0
this.$element.find(inputSelector).trigger('input.bs.validator')
$.when(
this.$element.find(inputSelector).trigger('input.bs.validator')
).then(function() {
self.$element.trigger('form.validated.bs.validator')
});
this.options.delay = delay

return this