Browse Source

updating form.js

If the field is disabled, just mark it as valid.
pull/1408/head
eduardoromero 10 years ago
parent
commit
a2e863829d
1 changed files with 4 additions and 0 deletions
  1. 4
      dist/components/form.js

4
dist/components/form.js

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

Loading…
Cancel
Save