@esfaenza/forms-and-validations 11.2.159-beta1 → 11.2.159-beta2

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.
@@ -2375,10 +2375,12 @@
2375
2375
  this.validationControl = comp;
2376
2376
  //Questa serve per passare avanti i validatori
2377
2377
  if (this.UseUserValidators) {
2378
+ var validatorsToSet = this._validators.filter(function (v) { return !v.ngOnInit; });
2379
+ this.ngControl.control.setValidators(validatorsToSet);
2378
2380
  //#DEBUG
2379
2381
  console.log("Validatori impostati a livello di base form per il validation control: " + this.validationControl.name);
2380
- console.log(this._validators);
2381
- this.validationControl.control.setValidators(this._validators);
2382
+ console.log(validatorsToSet);
2383
+ this.validationControl.control.setValidators(validatorsToSet);
2382
2384
  }
2383
2385
  //Se sono staccato dal Form (vuol dire che sono ad esempio dentro un ng-template) aggiungo il controllo al Form passato come input (context del template)
2384
2386
  if (this.Form && !this.formHasBeenBound) {