diff --git a/src/apis/users/schema.ts b/src/apis/users/schema.ts index 4b173694..5b4fe594 100644 --- a/src/apis/users/schema.ts +++ b/src/apis/users/schema.ts @@ -22,7 +22,7 @@ export const PasswordSchema = z .regex(REGEX.password, ERROR_MESSAGE.password.regex), [passwordConfirm]: z.string(), }) - .refine((data) => data.password === data.passwordConfirm, { + .refine((data) => data[password] === data[passwordConfirm], { path: [passwordConfirm], message: ERROR_MESSAGE.password.refine, });