diff --git a/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.spec.ts b/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.spec.ts index cee669970faa3b938e3b1cb88de403dda35c8402..e14da6e4b83e4d1960ad1af78c6c13a6eb381b73 100644 --- a/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.spec.ts +++ b/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.spec.ts @@ -92,7 +92,7 @@ describe('FormControlEditorAbstractComponent', () => { it('should remove fieldControl errors', () => { component.fieldControl.setErrors({ fehler: 'this is an validation error' }); - component.removeErrors(); + component._removeErrors(); expect(component.fieldControl.errors).toBeNull(); }); @@ -100,7 +100,7 @@ describe('FormControlEditorAbstractComponent', () => { it('should call update invalid params', () => { component._updateInvalidParams = jest.fn(); - component.removeErrors(); + component._removeErrors(); expect(component._updateInvalidParams).toHaveBeenCalled(); }); @@ -108,7 +108,7 @@ describe('FormControlEditorAbstractComponent', () => { it('should call clear all parent controls', () => { component._clearAllParentErrors = jest.fn(); - component.removeErrors(); + component._removeErrors(); expect(component._clearAllParentErrors).toHaveBeenCalledWith(component.control.control); }); diff --git a/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.ts b/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.ts index 6e07be87f87380f8f888a4758aedfa1113f9a0ee..2a11953641df481a4aaac5e547983b36afa6c047 100644 --- a/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.ts +++ b/alfa-client/libs/design-component/src/lib/form/formcontrol-editor.abstract.component.ts @@ -58,7 +58,7 @@ export abstract class FormControlEditorAbstractComponent implements ControlValue _fieldControlOnChangeHandler(value: unknown): void { this.onChange(value); - this.removeErrors(); + this._removeErrors(); } touch(): void { @@ -93,7 +93,7 @@ export abstract class FormControlEditorAbstractComponent implements ControlValue this._updateInvalidParams(); } - removeErrors(): void { + _removeErrors(): void { if (!this.control) return; this.fieldControl.setErrors(null);