Browse Source

Add form disabled check

pull/1481/head
jlukic 10 years ago
parent
commit
43e9113d55
1 changed files with 5 additions and 1 deletions
  1. 6
      src/definitions/behaviors/form.js

6
src/definitions/behaviors/form.js

@ -398,7 +398,11 @@ $.fn.form = function(fields, parameters) {
fieldValid = true,
fieldErrors = []
;
if(field.optional && $.trim($field.val()) === ''){
if($field.prop('disabled')) {
module.debug('Field is disabled. Skipping', field.identifier);
fieldValid = true;
}
else if(field.optional && $.trim($field.val()) === ''){
module.debug('Field is optional and empty. Skipping', field.identifier);
fieldValid = true;
}

Loading…
Cancel
Save