davidmdm / myzod

MIT License
315 stars 20 forks source link

TypeError Message support #31

Closed davidmdm closed 3 years ago

davidmdm commented 3 years ago

A need to add support for user defined messages for schema type errors

boy51 commented 3 years ago

Works as expected, only thing I would kinda expect is to be able to pass this to TypeOptions, i.e. z.string({ typeError: "..." }) since min or max works similarly, but thats just me

davidmdm commented 3 years ago

And do you think having simple function support is enough for working with locales

boy51 commented 3 years ago

Sure, its enough for anyone to implement it themselves.