Skip to content

Commit

Permalink
Fix endsWith default message (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosriveroib authored Jul 22, 2022
1 parent 4ade47a commit b29cee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deno/lib/ZodError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export const defaultErrorMap = (
if ("startsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
} else if ("endsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.endsWith}"`;
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
} else {
util.assertNever(issue.validation);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ZodError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export const defaultErrorMap = (
if ("startsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
} else if ("endsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.endsWith}"`;
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
} else {
util.assertNever(issue.validation);
}
Expand Down

0 comments on commit b29cee1

Please sign in to comment.