-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add currency
component
#50
Conversation
const defaultValueSchema = singleValueSchema.or(multipleValueSchema); | ||
|
||
const currencySpecific = z.object({ | ||
decimalLimit: z.number().int().positive().optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the types restrict this to the values 0-9 (maybe 10), so perhaps we should do the same here?
z.union([z.literal(0), z.literal(1), z.literal(2)])
etc. (you can write a nice Array(9).map
for this probably).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, had to cast as any
because it doesn't typecheck somehow
No description provided.