Skip to content

Commit

Permalink
Semantic-Org#4497 check if validation rule is defined when revalidating
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Abner, Anton Keks committed Sep 12, 2016
1 parent f725b16 commit 9411e01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ $.fn.form = function(parameters) {
$fieldGroup = $field.closest($group),
validationRules = module.get.validation($field)
;
if(settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) ) {
if(validationRules && (settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) )) {
clearTimeout(module.timer);
module.timer = setTimeout(function() {
module.debug('Revalidating field', $field, module.get.validation($field));
Expand Down

0 comments on commit 9411e01

Please sign in to comment.