You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for extending zod error messages from existing objects #6758
I have a zod object that is handed to me from elsewhere, and I do not have the ability to change it. However, I do know what items it contains. For example, it has a "firstName" string with a min length of 3 and a max length of 24.
I believe at present there is no way to do something like:
Could support be added for such a feature? I had requested this in #4057 and the ticket was closed without providing the support. Multiple people upvoted my issue, so I believe it is something many people desire.
Activity
anthonyyya commentedon Nov 15, 2026
I made a branch here:
https://github.com/anthonyalayo/zod/tree/update-messages
And a release here:
https://www.npmjs.com/package/@anthonyalayo/zod