ZodZ
Zod•3y ago
Scott Trinh

You could also declare the schema in camelCase and use a preprocess setup to do your conversion, but

You could also declare the schema in camelCase and use a preprocess setup to do your conversion, but you'll need to guard the preprocessor, too, so maybe even some kind of piping of
z.record(z.string()).pipe(z.preprocess(camelCaseify, MySchema))
might make sense
Was this page helpful?