diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/partials/orgnrToogle.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/partials/orgnrToogle.tsx index 6da3a2b81bd..46471bf2e24 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/partials/orgnrToogle.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/partials/orgnrToogle.tsx @@ -48,10 +48,14 @@ export const OrgnrToggle = ({ const handleToggleChange = (value: string) => { setInputType(value) formMethods.setValue(virksomhetPath, '') + formMethods.clearErrors(`manual.${virksomhetPath}`) + formMethods.clearErrors(virksomhetPath) } const handleChangeEgne = (value: { orgnr: string }) => { formMethods.setValue(virksomhetPath, value.orgnr) + formMethods.clearErrors(`manual.${virksomhetPath}`) + formMethods.clearErrors(virksomhetPath) } if (fasteOrganisasjonerLoading || brukerOrganisasjonerLoading) {