Skip to content

Demos

Empty

<Field.PhoneNumber onChange={(value) => console.log('onChange', value)} />

Placeholder

<Field.PhoneNumber
placeholder="Call this number"
onChange={(value) => console.log('onChange', value)}
/>

Label

<Field.PhoneNumber
label="Label text"
onChange={(value) => console.log('onChange', value)}
/>

Label and value

<Field.PhoneNumber
label="Label text"
value="+47 98765432"
onChange={(value) => console.log('onChange', value)}
/>

Disabled

<Field.PhoneNumber
value="+47 12345678"
label="Label text"
onChange={(value) => console.log('onChange', value)}
disabled
/>

Error

This is what is wrong...
<Field.PhoneNumber
value="007"
label="Label text"
onChange={(value) => console.log('onChange', value)}
error={new FormError('This is what is wrong...')}
/>

Validation - Required

<Field.PhoneNumber
value="+47 888"
label="Label text"
onChange={(value) => console.log('onChange', value)}
required
/>