Browse Source

Simplify debug on blur

pull/2369/head
jlukic 9 years ago
parent
commit
f3f2e7f50e
1 changed files with 6 additions and 5 deletions
  1. 11
      src/definitions/behaviors/form.js

11
src/definitions/behaviors/form.js

@ -272,15 +272,16 @@ $.fn.form = function(parameters) {
},
blur: function() {
var
$field = $(this),
$fieldGroup = $field.closest($group)
$field = $(this),
$fieldGroup = $field.closest($group),
validationRules = module.get.validation($field)
;
if( $fieldGroup.hasClass(className.error) ) {
module.debug('Revalidating field', $field, module.get.validation($field));
module.validate.field( module.get.validation($field) );
module.debug('Revalidating field', $field, validationRules);
module.validate.field( validationRules );
}
else if(settings.on == 'blur' || settings.on == 'change') {
module.validate.field( module.get.validation($field) );
module.validate.field( validationRules );
}
},
change: function() {

Loading…
Cancel
Save