https://zod.dev/error-customization?id=the-error-param
This library currently hardcodes the error string if parsing/coercion fails. Unfortunately, it would be a breaking change to make the z* validators functions instead of objects:
zPlainDate("error message")
or:
zPlainDate({ message: "error message" })
Maybe they could be both validator objects and a function that returns validator objects?
https://zod.dev/error-customization?id=the-error-param
This library currently hardcodes the error string if parsing/coercion fails. Unfortunately, it would be a breaking change to make the
z*validators functions instead of objects:or:
Maybe they could be both validator objects and a function that returns validator objects?