gd-bs 6.5.1 → 6.5.2

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.
@@ -661,13 +661,16 @@ var FormControl = /** @class */ (function () {
661
661
  };
662
662
  // Updates the control validation
663
663
  FormControl.prototype.updateValidation = function (elControl, validation) {
664
+ // See if this is a checkbox/switch
665
+ var isCheckbox = elControl.querySelectorAll(".form-check").length > 0;
664
666
  // Get the form controls
665
- var elFormControls = elControl.querySelectorAll(".form-control");
667
+ var elFormControls = isCheckbox ? [elControl] : elControl.querySelectorAll(".form-control");
666
668
  elFormControls = elFormControls.length == 0 ? elControl.querySelectorAll(".form-select") : elFormControls;
669
+ // Parse the form controls
667
670
  for (var i = 0; i < elFormControls.length; i++) {
668
671
  // Ensure the control exists
669
672
  var elFormControl = elFormControls[i];
670
- if (elFormControl) {
673
+ if (!isCheckbox) {
671
674
  // Clear the invalid/valid classes
672
675
  elFormControl.classList.remove("is-invalid");
673
676
  elFormControl.classList.remove("is-valid");