-
-
Notifications
You must be signed in to change notification settings - Fork 499
Open
Labels
Description
This feature request comes from houseform/houseform#60, the older form library I maintained
Description
Ideally, I'd like to have a number, displayed as a string (say, a locale with 1,000,000
) and then transform this number back during the field submission.
<Field
name="number"
initialValue={'0'}
// This is the magic
transformOnSubmit={v => parseFloat(v)}
onChangeValidate={z.coerce.number().min(1, 'Must be at least 1')}
/>
rodogir, IdoBouskila, jessekelly881, bennettdams, kult0922 and 20 morecesargdm, DiederikvandenB and danhausIdoBouskila, jessekelly881, cesargdm and romulovalez