79398754

Date: 2025-01-30 04:10:27
Score: 1.5
Natty:
Report link

To override the default error messages from zod types (i.e. invalid_type), you can optionally provide the errorMap parameter; for example:

z.object( { errorMap: () => ( { message: '[message]' } ) } )

Per, https://github.com/colinhacks/zod/discussions/3094#discussioncomment-7984907

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Nicholas Dullam