Skip to content

Import

import { Field } from '@dnb/eufemia/extensions/forms'
render(<Field.OrganizationNumber />)

Description

Field.OrganizationNumber is a wrapper component for the input of strings, with user experience tailored for organization number values.

This input expects a 9-digit number as its value. This is because Norwegian organization numbers are 9-digits long, based on info from Brønnøysundregisteret It validates input for Norwegian organization numbers as described by Brønnøysundregistrene, and in addition we validate 000 000 000 as invalid. The validation happens on blur, internally using the onBlurValidator property.

There is a corresponding Value.OrganizationNumber component.

Relevant links

Validators

Internal validators exposed

Field.OrganizationNumber expose the organizationNumberValidator validator through its onChangeValidator and onBlurValidator property, take a look at this demo. The organizationNumberValidator validator, validates if the organization number provided is a Norwegian organization number or not.