gd-bs 6.9.18 → 6.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/form/index.js +15 -0
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +4 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -2
- package/src/components/form/controlTypes.d.ts +1 -0
- package/src/components/form/formTypes.d.ts +3 -0
- package/src/components/form/index.ts +17 -0
|
@@ -88,6 +88,21 @@ class _Form extends Base {
|
|
|
88
88
|
this.el.appendChild(row.el);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
+
// Clears the validation on the form
|
|
92
|
+
clearValidation() {
|
|
93
|
+
// Find the controls that have been validated
|
|
94
|
+
let controls = this.el.querySelectorAll(".is-valid");
|
|
95
|
+
for (let i = 0; i < controls.length; i++) {
|
|
96
|
+
// Remove the class
|
|
97
|
+
controls[i].classList.remove("is-valid");
|
|
98
|
+
}
|
|
99
|
+
// Find the controls that have been validated
|
|
100
|
+
controls = this.el.querySelectorAll(".is-invalid");
|
|
101
|
+
for (let i = 0; i < controls.length; i++) {
|
|
102
|
+
// Remove the class
|
|
103
|
+
controls[i].classList.remove("is-invalid");
|
|
104
|
+
}
|
|
105
|
+
}
|
|
91
106
|
// The forms controls
|
|
92
107
|
get controls() {
|
|
93
108
|
let controls = [];
|