Skip to content

Commit e1b3494

Browse files
committed
Merge branch 'hotfix/issue354'
2 parents e1f8d9b + d992cbe commit e1b3494

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

form-validator/jquery.form-validator.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@
317317
eventType
318318
);
319319

320+
if (attachKeyupEvent) {
321+
$elem.unbind('keyup.validation');
322+
}
323+
320324
if ( result.isValid ) {
321325
if( result.shouldChangeDisplay ) {
322326
$elem.addClass('valid');
@@ -330,13 +334,11 @@
330334
_setInlineErrorMessage($elem, result.errorMsg, conf, conf.errorMessagePosition);
331335

332336
if (attachKeyupEvent) {
333-
$elem
334-
.unbind('keyup.validation')
335-
.bind('keyup.validation', function (evt) {
336-
if( evt.keyCode !== 9 ) {
337-
$(this).validateInputOnBlur(language, conf, false, 'keyup');
338-
}
339-
});
337+
$elem.bind('keyup.validation', function (evt) {
338+
if( evt.keyCode !== 9 ) {
339+
$(this).validateInputOnBlur(language, conf, false, 'keyup');
340+
}
341+
});
340342
}
341343
}
342344

0 commit comments

Comments
 (0)