@yuuvis/client-framework 3.3.0 → 3.4.1

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.
@@ -881,8 +881,15 @@ class DynamicCatalogComponent extends AbstractMatFormField {
881
881
  this.disabled = isDisabled;
882
882
  }
883
883
  ngOnInit() {
884
+ const validators = [this.#optionIsActiveValidator];
884
885
  if (this.required)
885
- this.ctrl.setValidators([this.#optionIsActiveValidator, Validators.required]);
886
+ validators.push(Validators.required);
887
+ // Mirror the parent FormControl's validators so the inner ctrl evaluates
888
+ // the same rules the host's NgControl does. Read lazily — picks up
889
+ // validators added after init.
890
+ validators.push((control) => this.ngControl?.control?.validator?.(control) ?? null);
891
+ this.ctrl.setValidators(validators);
892
+ this.ctrl.setAsyncValidators((control) => this.ngControl?.control?.asyncValidator?.(control) ?? of(null));
886
893
  this.ctrl.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe(() => {
887
894
  this.errorState = FormUtils.getErrorState(this.ctrl);
888
895
  if (this.ngControl?.control) {