Preventing auto formatting on NumberField to exclude comma separation? #5732
-
This may go against the purpose of the component, however is there anyway to prevent the NumberField from formatting numbers to include the comma separation? My zod validation requires a number input to be 6 digits but I'm facing the issue below. Current number input > 123456 I scanned the docs and it's not exactly clear anywhere on how to achieve this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I think you can use the This will however only change the way the numbers are displayed on screen - it should not affect the zod validation. |
Beta Was this translation helpful? Give feedback.
I think you can use the
formatOptions
parameter, specificallyformatOptions={{ useGrouping: false }}
, to not display the number without thousands separators.This will however only change the way the numbers are displayed on screen - it should not affect the zod validation.