From 9411e0182e6803fd5bb8abd0ebea68ab336f48f9 Mon Sep 17 00:00:00 2001 From: "Patrick Abner, Anton Keks" Date: Mon, 12 Sep 2016 13:49:56 +0300 Subject: [PATCH] #4497 check if validation rule is defined when revalidating --- src/definitions/behaviors/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index d488f1aea..0a42d2508 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -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));