Skip to content

Commit

Permalink
docs: Fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkarolyi committed Aug 29, 2021
1 parent a7bbf66 commit 98648e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ try {
// typeof user == User
} catch (error) {
error.message ===
'Validation failed: Missing value at path "name", expected type: string'; // true
'Validation failed: Missing value at "name", expected type: string'; // true
}
```

Expand Down Expand Up @@ -267,7 +267,7 @@ try {
// typeof user === User
} catch (error) {
error.message ===
'Validation failed: Missing value at path "cart.total", expected type: number'; // true
'Validation failed: Missing value at "cart.total", expected type: number'; // true
error.path === ["cart", "total"]; // false because it's a reference 🙄, but you got the idea
error.expectedType === "number"; //true
}
Expand Down

0 comments on commit 98648e0

Please sign in to comment.