|
@ -299,7 +299,9 @@ $.fn.form = function(parameters) { |
|
|
; |
|
|
; |
|
|
if( $fieldGroup.hasClass(className.error) ) { |
|
|
if( $fieldGroup.hasClass(className.error) ) { |
|
|
module.debug('Revalidating field', $field, validationRules); |
|
|
module.debug('Revalidating field', $field, validationRules); |
|
|
module.validate.form.call(module, event, true); |
|
|
|
|
|
|
|
|
if(validationRules) { |
|
|
|
|
|
module.validate.field( validationRules ); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
else if(settings.on == 'blur' || settings.on == 'change') { |
|
|
else if(settings.on == 'blur' || settings.on == 'change') { |
|
|
if(validationRules) { |
|
|
if(validationRules) { |
|
@ -310,13 +312,14 @@ $.fn.form = function(parameters) { |
|
|
change: function(event) { |
|
|
change: function(event) { |
|
|
var |
|
|
var |
|
|
$field = $(this), |
|
|
$field = $(this), |
|
|
$fieldGroup = $field.closest($group) |
|
|
|
|
|
|
|
|
$fieldGroup = $field.closest($group), |
|
|
|
|
|
validationRules = module.get.validation($field) |
|
|
; |
|
|
; |
|
|
if(settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) ) { |
|
|
if(settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) ) { |
|
|
clearTimeout(module.timer); |
|
|
clearTimeout(module.timer); |
|
|
module.timer = setTimeout(function() { |
|
|
module.timer = setTimeout(function() { |
|
|
module.debug('Revalidating field', $field, module.get.validation($field)); |
|
|
module.debug('Revalidating field', $field, module.get.validation($field)); |
|
|
module.validate.form.call(module, event, true); |
|
|
|
|
|
|
|
|
module.validate.field( validationRules ); |
|
|
}, settings.delay); |
|
|
}, settings.delay); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|