@ascentgl/ads-ui 21.40.0 → 21.41.0

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.
@@ -2629,9 +2629,7 @@ class AbstractBaseComponent {
2629
2629
  this.displayControl.markAsTouched();
2630
2630
  }
2631
2631
  // If configured, treat empty value as "no validation" state.
2632
- // But only if there are no validators set (validators being present means validation is intentional).
2633
- const hasValidators = this.valueControl.validator !== null || this.valueControl.asyncValidator !== null;
2634
- if (this.skipValidationWhenEmpty && this.isEmptyValue(this.valueControl.value) && !hasValidators) {
2632
+ if (this.skipValidationWhenEmpty && this.isEmptyValue(this.valueControl.value)) {
2635
2633
  if (this.valueControl.errors) {
2636
2634
  this.valueControl.setErrors(null);
2637
2635
  }
@@ -2650,8 +2648,7 @@ class AbstractBaseComponent {
2650
2648
  }
2651
2649
  /** @ignore */
2652
2650
  canShowError() {
2653
- const hasValidators = this.valueControl.validator !== null || this.valueControl.asyncValidator !== null;
2654
- if (this.skipValidationWhenEmpty && this.isEmptyValue(this.valueControl.value) && !hasValidators)
2651
+ if (this.skipValidationWhenEmpty && this.isEmptyValue(this.valueControl.value))
2655
2652
  return false;
2656
2653
  return !!this.valueControl.errors && (this.valueControl.touched || this.immediateValidation);
2657
2654
  }