@esfaenza/forms-and-validations 11.2.159-beta4 → 11.2.159
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/bundles/esfaenza-forms-and-validations.umd.js +4 -5
- package/bundles/esfaenza-forms-and-validations.umd.js.map +1 -1
- package/esm2015/lib/forms/base-form-control.js +5 -6
- package/fesm2015/esfaenza-forms-and-validations.js +4 -5
- package/fesm2015/esfaenza-forms-and-validations.js.map +1 -1
- package/package.json +1 -1
|
@@ -2376,13 +2376,12 @@
|
|
|
2376
2376
|
this.validationControl = comp;
|
|
2377
2377
|
//Questa serve per passare avanti i validatori
|
|
2378
2378
|
if (this.UseUserValidators) {
|
|
2379
|
-
var validatorsToSet = this._validators.filter(function (v) { return !v.ngOnInit; });
|
|
2380
|
-
this.ngControl.control.setValidators(validatorsToSet);
|
|
2379
|
+
var validatorsToSet = ((_a = this._validators) === null || _a === void 0 ? void 0 : _a.filter(function (v) { return !v.ngOnInit; })) || null;
|
|
2381
2380
|
//#DEBUG
|
|
2382
2381
|
console.log("Validatori impostati a livello di base form per il validation control: " + this.validationControl.name);
|
|
2383
|
-
console.log(
|
|
2384
|
-
if (((
|
|
2385
|
-
this.validationControl.control.setValidators(
|
|
2382
|
+
console.log(validatorsToSet);
|
|
2383
|
+
if (((validatorsToSet === null || validatorsToSet === void 0 ? void 0 : validatorsToSet.length) || 0) > 0)
|
|
2384
|
+
this.validationControl.control.setValidators(validatorsToSet);
|
|
2386
2385
|
}
|
|
2387
2386
|
//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)
|
|
2388
2387
|
if (this.Form && !this.formHasBeenBound) {
|