-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for root validation error
With this change, `_root` is now a reserved key in `validationError` object. In some cases it's useful to define a global validation error in your Zod schema, using `.superRefine(input, ctx)`, without specifing a path in `ctx.addIssue()`. Now it's returned to the client, when defined.
- Loading branch information
Showing
2 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters