Browse Source

#4497 check if validation rule is defined when revalidating

pull/4547/head
Patrick Abner, Anton Keks 8 years ago
parent
commit
9411e0182e
1 changed files with 1 additions and 1 deletions
  1. 2
      src/definitions/behaviors/form.js

2
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));

Loading…
Cancel
Save