godalming123 - Hi, I'm making a flashcards app ...
Arthur - tsexport const getServicesSchema = se...
neurotech - Hi everyone. I'm struggling with zo...
input
that has a type
of number
.
AFAICT, the typing of this input's value is a string, so I need zod
to coerce it to number in order to validate properly against this schema:...z.coerce.number<number>()
z.coerce.number<number>()
Josh - hey, why the heck is this invalid?ts ...
neurotech - Similar to the above, I have an inp...
input
element with a type
of "number"
. How do I validate it's value as a number when using zod
4 in combination with react-hook-form
? z.coerce
's input type change to unknown
seems to have made this more difficult.@hookform/resolvers
properly infers input/output now) or pass both input and output typessemajy - Hello! I'm sort of new to typescript a...
neurotech - Hi everyone, I just updated to zod ...
4.0.15
and everything's working well except for one last remaining file in my project.
I have a generic component, InputFormField
, that can be imbued with a schema, i.e.:
```tsx
<InputFormField<typeof FormSchema>
control={form.control}...react-hook-form
issueTim Marcus Moore - I found that z.record evalua...
z.record
evaluates non-enumerable property keys. I'm not sure whether this is a bug or expected behaviour. It was unexpected to me. I ran into this validating a MobX observable object using a z.record
with z.string()
keys. MobX adds non-enumerable symbol properties, which caused parsing to fail.
If it's a bug, I can open an issue on GitHub, but if it's intentional, I'll just adjust my expectations 🙂
This test demonstrates the problem....Svish - Does inference somehow work differently...
MattIPv4 - :WaveDoggo: Dependeabot has opened a...
import-x/no-unresolved
being unable to resolve zod
. Have others seen this and know how to get around it?CrisOG - Hey! I just read Zod stable is coming ...
Tango - I have the need to handle discriminated...
MHD Alaa - Hi everyone, first time here.I’m ju...
MattIPv4 - :WaveDoggo: I think this might be a ...
import()
types. I've figured out how to partially preserve them when generating declaration files, but I'm still getting some unknown
s included instead of references to the import()
types.Maxiviper117 - I'm working on validating an obj...
MattIPv4 - :WaveDoggo: Hey Zod experts. Given a...
Gludek - Hey,Quick question, is there any way ...
Leozinn - const AuthorSchema = z.object({ ...
