diff --git a/deno/lib/ZodError.ts b/deno/lib/ZodError.ts index c7a66aa6b..b5739a2f8 100644 --- a/deno/lib/ZodError.ts +++ b/deno/lib/ZodError.ts @@ -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); } diff --git a/src/ZodError.ts b/src/ZodError.ts index 01f4b45c7..7ddee45e3 100644 --- a/src/ZodError.ts +++ b/src/ZodError.ts @@ -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); }