#I'm using mantine `useForm` with `zod` and have an issue with optional int.
4 messages ยท Page 1 of 1 (latest)
NumberInput component does not support null value. Its value can be either a string or a number
I see, thank you!
Depending on your situation you can try use
const mantineNumber = z.coerce.number().nullable();
or this may work better, keeping null when number input is empty after having value typed in
const mantineNumber = z.number().or(z.literal(โโ)).nullable().transform(val=>val===โโ?null:val)