fix: zod v4 z.literal() API 호환 (SignupPage)
All checks were successful
SPMS_BO/pipeline/head This commit looks good

errorMap은 zod v4에서 지원하지 않으므로 message로 교체.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
SEAN 2026-02-26 16:45:42 +09:00
parent bb82846d59
commit 2c4701939d

View File

@ -30,9 +30,7 @@ const signupSchema = z
.string() .string()
.min(1, "전화번호를 입력해주세요.") .min(1, "전화번호를 입력해주세요.")
.regex(phoneRegex, "올바른 전화번호 형식이 아닙니다."), .regex(phoneRegex, "올바른 전화번호 형식이 아닙니다."),
agree: z.literal(true, { agree: z.literal(true, { message: "약관에 동의해주세요." }),
errorMap: () => ({ message: "약관에 동의해주세요." }),
}),
}) })
.refine((data) => data.password === data.passwordConfirm, { .refine((data) => data.password === data.passwordConfirm, {
message: "비밀번호가 일치하지 않습니다.", message: "비밀번호가 일치하지 않습니다.",