@esfaenza/forms-and-validations 15.2.40 → 15.2.42
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/esm2020/lib/forms/base-form-control.mjs +5 -1
- package/esm2020/lib/forms/form-adaptive/form-adaptive.component.mjs +2 -1
- package/fesm2015/esfaenza-forms-and-validations.mjs +5 -0
- package/fesm2015/esfaenza-forms-and-validations.mjs.map +1 -1
- package/fesm2020/esfaenza-forms-and-validations.mjs +5 -0
- package/fesm2020/esfaenza-forms-and-validations.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1922,6 +1922,10 @@ class BaseFormControl {
|
|
|
1922
1922
|
v._createValidator();
|
|
1923
1923
|
});
|
|
1924
1924
|
}
|
|
1925
|
+
var prevValidators = this.ngControl.control._validators;
|
|
1926
|
+
this.ngControl.control.clearValidators();
|
|
1927
|
+
if (prevValidators)
|
|
1928
|
+
this.ngControl.control.addValidators(prevValidators.filter(v => !v.ngOnInit));
|
|
1925
1929
|
if (this._validators)
|
|
1926
1930
|
this.ngControl.control.addValidators(this._validators.filter(v => !v.ngOnInit));
|
|
1927
1931
|
this.ngControl.control.updateValueAndValidity();
|
|
@@ -2606,6 +2610,7 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2606
2610
|
}
|
|
2607
2611
|
break;
|
|
2608
2612
|
}
|
|
2613
|
+
pv._validator = pv.createValidator(pv.pattern);
|
|
2609
2614
|
this.ngControl._setValidators(validators);
|
|
2610
2615
|
this.ngControl.control.setValidators(validators);
|
|
2611
2616
|
this.ngControl.control.updateValueAndValidity();
|