You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a NumberInput component that accepts either a number or an empty string (for invalid or empty input). I would like to model this in zod using z.number().or(z.literal("")), but this gives the error message
No matching zod schema for type ZodUnion found in mapping for property <property>. Make sure there's a matching zod schema for every property in your schema.
I see that discriminated unions are supported. I'd love to be able to use regular unions, too.
The text was updated successfully, but these errors were encountered:
I have a
NumberInput
component that accepts either anumber
or an empty string (for invalid or empty input). I would like to model this in zod usingz.number().or(z.literal(""))
, but this gives the error messageI see that discriminated unions are supported. I'd love to be able to use regular unions, too.
The text was updated successfully, but these errors were encountered: