Browse Source

Update form.js

check if field has display: none
avalanche1-patch-1
Kat KatKat 8 years ago
committed by GitHub
parent
commit
1c0655590c
1 changed files with 5 additions and 0 deletions
  1. 5
      src/definitions/behaviors/form.js

5
src/definitions/behaviors/form.js

@ -878,6 +878,11 @@ $.fn.form = function(parameters) {
module.error(error.noRule, ruleName);
return;
}
if ($field.css('display') === 'none' || (
$field.parents('.field').length && $field.parents('.field').eq(0).css('display') === 'none')
) {
return true;
}
// cast to string avoiding encoding special values
value = (value === undefined || value === '' || value === null)
? ''

Loading…
Cancel
Save