Skip to content

Commit 43369d5

Browse files
Merge pull request victorjonsson#670 from BrianRosamilia/master
Add empty element check in case element was filtered by toggleDisabled
2 parents 18150ec + 34a27ff commit 43369d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/jquery-plugins.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
* * @return {jQuery}
5757
*/
5858
$.fn.validateOnEvent = function (language, config) {
59+
if(this.length === 0) {
60+
return;
61+
}
62+
5963
var $elements = this[0].nodeName === 'FORM' ? this.find('*[data-validation-event]') : this;
6064
$elements
6165
.each(function () {

0 commit comments

Comments
 (0)