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.
@@ -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 = [];