Skip to content

Commit

Permalink
Fiks valideringsfeil i inntektsmelding-form
Browse files Browse the repository at this point in the history
  • Loading branch information
betsytraran committed Jan 9, 2025
1 parent 46ffbd1 commit 5aa58bf
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5aa58bf

Please sign in to comment.