Description
Field.OrganizationNumber
is a wrapper component for the input of strings, with user experience tailored for organization number values.
import { Field } from '@dnb/eufemia/extensions/forms'render(<Field.OrganizationNumber />)
Demos
Empty
Code Editor
<Field.OrganizationNumberonChange={(value) => console.log('onChange', value)}/>
Omit mask
Code Editor
<Field.OrganizationNumberonChange={(value) => console.log('onChange', value)}omitMask/>
Placeholder
Code Editor
<Field.OrganizationNumberplaceholder="Enter 9 digits..."onChange={(value) => console.log('onChange', value)}/>
Label
Code Editor
<Field.OrganizationNumberlabel="Label text"onChange={(value) => console.log('onChange', value)}/>
Label and value
Code Editor
<Field.OrganizationNumberlabel="Label text"value="987654321"onChange={(value) => console.log('onChange', value)}/>
With help
Code Editor
<Field.OrganizationNumberlabel="Label text"value="987654321"help={{title: 'Help is available',contents:'Success has nothing to do with what you gain in life or accomplish for yourself. It’s what you do for others.',}}onChange={(value) => console.log('onChange', value)}/>
Disabled
Code Editor
<Field.OrganizationNumbervalue="989898989"label="Label text"onChange={(value) => console.log('onChange', value)}disabled/>
Error
This is what is wrong...
Code Editor
<Field.OrganizationNumbervalue="007"label="Label text"onChange={(value) => console.log('onChange', value)}error={new FormError('This is what is wrong...')}/>
Validation - Required
Code Editor
<Field.OrganizationNumbervalue="123456789"label="Label text"onChange={(value) => console.log('onChange', value)}required/>