The string().date() validation message takes a string as a parameter,
date(message?: string): ZodString;
whereas all the rest of the methods take in an errorUtil.ErrMessage, ex:
email(message?: errorUtil.ErrMessage): ZodString;
This is not a huge issue, though it is inconsistent with the docs which show error messages for the string().date() validator can be set in this way
z.string().date({ message: "Invalid date string!" });
when they actually are set like this
z.string().date("Invalid date string!");
The string().date() validation message takes a string as a parameter,
date(message?: string): ZodString;
whereas all the rest of the methods take in an errorUtil.ErrMessage, ex:email(message?: errorUtil.ErrMessage): ZodString;
This is not a huge issue, though it is inconsistent with the docs which show error messages for the string().date() validator can be set in this way
z.string().date({ message: "Invalid date string!" });
when they actually are set like thisz.string().date("Invalid date string!");