Skip to content

Commit

Permalink
docs: fix typo on the error handling guide (#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
derenkeskin committed May 4, 2022
1 parent 7296aae commit 4cf7e7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ERROR_HANDLING.md
Expand Up @@ -416,9 +416,9 @@ Both `.flatten()` and `.format()` accept an optional mapping function of `(issue
This can be particularly useful when integrating Zod with form validation, as it allows you to pass back whatever `ZodIssue` specific context you might need.

```ts
result.error.flatten((iss: ZodIssue) => ({
message: i.message,
errorCode: i.code,
result.error.flatten((issue: ZodIssue) => ({
message: issue.message,
errorCode: issue.code,
}));
/*
{
Expand Down

0 comments on commit 4cf7e7c

Please sign in to comment.