Browse Source

Fix #1630, Checkbox must have error removed before reset to avoid revalidating

pull/1698/merge
jlukic 9 years ago
parent
commit
3071d9ee9c
1 changed files with 4 additions and 4 deletions
  1. 8
      src/definitions/behaviors/form.js

8
src/definitions/behaviors/form.js

@ -143,6 +143,10 @@ $.fn.form = function(fields, parameters) {
isDropdown = $element.is(selector.uiDropdown),
isErrored = $fieldGroup.hasClass(className.error)
;
if(isErrored) {
module.verbose('Resetting error on field', $fieldGroup);
$fieldGroup.removeClass(className.error);
}
if(isDropdown) {
module.verbose('Resetting dropdown value', $element, defaultValue);
$element.dropdown('restore defaults');
@ -160,10 +164,6 @@ $.fn.form = function(fields, parameters) {
module.verbose('Resetting field value', $field, defaultValue);
$field.val(defaultValue);
}
if(isErrored) {
module.verbose('Resetting error on field', $fieldGroup);
$fieldGroup.removeClass(className.error);
}
})
;
},

Loading…
Cancel
Save