]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: keep the already set input error classes - closes #12081 12082/head
authorDaniel Ruf <mac1@daniel-ruf.de>
Fri, 22 May 2020 15:35:57 +0000 (17:35 +0200)
committerDaniel Ruf <mac1@daniel-ruf.de>
Fri, 22 May 2020 15:35:57 +0000 (17:35 +0200)
js/foundation.abide.js

index a9544fccee0954177e8fb3744ecf8c0cef0c71f8..ae4fb5cc85915ab92a9a827c5ecd4bec0c20830b 100644 (file)
@@ -498,10 +498,10 @@ class Abide extends Plugin {
     }
 
     if (manageErrorClasses) {
-      this.removeErrorClasses($el);
-
       if (!goodToGo) {
         this.addErrorClasses($el, failedValidators);
+      } else {
+        this.removeErrorClasses($el);
       }
     }