From: Daniel Ruf Date: Fri, 22 May 2020 15:35:57 +0000 (+0200) Subject: fix: keep the already set input error classes - closes #12081 X-Git-Tag: v6.7.1~72^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F12082%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: keep the already set input error classes - closes #12081 --- diff --git a/js/foundation.abide.js b/js/foundation.abide.js index a9544fcce..ae4fb5cc8 100644 --- a/js/foundation.abide.js +++ b/js/foundation.abide.js @@ -498,10 +498,10 @@ class Abide extends Plugin { } if (manageErrorClasses) { - this.removeErrorClasses($el); - if (!goodToGo) { this.addErrorClasses($el, failedValidators); + } else { + this.removeErrorClasses($el); } }