From ee0ece45b2c150b279382dde2ce786fbc79d9b2c Mon Sep 17 00:00:00 2001 From: asineath-onpoint <145380373+asineath-onpoint@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:53:31 -0400 Subject: [PATCH] Update foundation.abide.js 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 --- js/foundation.abide.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/foundation.abide.js b/js/foundation.abide.js index cd1aca349..dda090171 100644 --- a/js/foundation.abide.js +++ b/js/foundation.abide.js @@ -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); } } -- 2.47.2