Skip to content

Commit

Permalink
Update foundation.abide.js
Browse files Browse the repository at this point in the history
Remove all existing validation error classes before applying current error classes in validateInput, in order to remove messages for validation rules that have been satisfied by most recent value change, even if other rules are still invalid
  • Loading branch information
asineath-onpoint committed Sep 18, 2023
1 parent 7f74c15 commit ee0ece4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/foundation.abide.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,9 @@ class Abide extends Plugin {
}

if (manageErrorClasses) {
this.removeErrorClasses($el);
if (!goodToGo) {
this.addErrorClasses($el, failedValidators);
} else {
this.removeErrorClasses($el);
this.addErrorClasses($el, failedValidators);
}
}

Expand Down

0 comments on commit ee0ece4

Please sign in to comment.