zod-error
zod-error copied to clipboard
Utilities to format and customize Zod error messages
🙏
https://github.com/colinhacks/zod/issues/3431#issuecomment-2069695827 ``` #15 29.02 ./lib/actions/projectActions.ts:137:47 #15 29.02 Type error: Argument of type 'Zod.ZodIssue[]' is not assignable to parameter of type 'import("/app/node_modules/zod-error/node_modules/zod/lib/ZodError").ZodIssue[]'. #15 29.02 Type 'Zod.ZodIssue' is not assignable to type...
Example schema: ```ts const a = z.object({ foo: z.string() }); const b = z.object({ bar: z.string() }); const schema: z.union([a, b]); ``` Example error: ```json ZodError: [ { "code": "invalid_union",...
Hey, nice library you have here :) I was playing around and noticed that when I received an `invalid_arguments` code that some critical information was missing in the printout. Here's...
Currently if i want to use following options for example, to change the order of path and message, changes made in the individual transforms are not applied. Therefore, I suggest...
It returns a string of ZodError ```cli [ { "code": "invalid_type", "expected": "string", "received": "number", "path": [ "field" ], "message": "Expected string, received number" } ] ``` it works fine...
First of all, thank you for this nice library! Both `parse` and `parseAsync` produce type errors when I'm trying to parse a schema containing `.transform()` (the example is directly taken...
