tuain-ng-forms-lib 14.0.7 → 14.0.8
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/classes/forms/field.mjs +3 -1
- package/esm2020/lib/components/forms/basic-form.mjs +1 -3
- package/fesm2015/tuain-ng-forms-lib.mjs +2 -2
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -1
- package/fesm2020/tuain-ng-forms-lib.mjs +2 -2
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -668,12 +668,14 @@ class FieldDescriptor extends FormElement {
|
|
|
668
668
|
get value() { return this.getValue(); }
|
|
669
669
|
set value(newValue) { this.setValue(newValue); }
|
|
670
670
|
notifyEditionPartial() {
|
|
671
|
+
this.resetError();
|
|
671
672
|
this._editionPartial.next({ code: this.fieldCode, intrinsicValidation: true });
|
|
672
673
|
}
|
|
673
674
|
notifyEditionFinish() {
|
|
674
675
|
let intrinsicValidation = true;
|
|
675
676
|
const fieldDefaultFormat = this._formConfig.fieldTypesPatterns?.[this.fieldType] ?? null;
|
|
676
677
|
const fieldValue = this.getValue();
|
|
678
|
+
this.resetError();
|
|
677
679
|
if (fieldValue && (fieldDefaultFormat || this.fieldFormat)) {
|
|
678
680
|
intrinsicValidation = (fieldDefaultFormat?.test(fieldValue) ?? true)
|
|
679
681
|
&& (this.fieldFormat?.test(fieldValue) ?? true);
|
|
@@ -2924,7 +2926,6 @@ class BasicFormComponent {
|
|
|
2924
2926
|
if (!fieldToValidate) {
|
|
2925
2927
|
return false;
|
|
2926
2928
|
}
|
|
2927
|
-
fieldToValidate.resetError();
|
|
2928
2929
|
const validationCallbacks = this._fieldInputValidation[fieldCode];
|
|
2929
2930
|
if (validationCallbacks) {
|
|
2930
2931
|
const clientValidationPromises = [];
|
|
@@ -2942,7 +2943,6 @@ class BasicFormComponent {
|
|
|
2942
2943
|
if (!fieldToValidate) {
|
|
2943
2944
|
return;
|
|
2944
2945
|
}
|
|
2945
|
-
fieldToValidate.resetError();
|
|
2946
2946
|
const validationCallbacks = this._fieldValidationsStart[fieldCode];
|
|
2947
2947
|
if (validationCallbacks) {
|
|
2948
2948
|
const clientValidationPromises = [];
|