fix: new password can be optional when submitting edit profile

This commit is contained in:
Michael Zetterberg
2024-10-16 11:35:43 +02:00
parent 9a0e1fae9d
commit 6be0510927

View File

@@ -26,7 +26,7 @@ export const editProfileSchema = z
),
password: z.string().optional(),
newPassword: z.literal("").or(passwordValidator()),
newPassword: z.literal("").optional().or(passwordValidator()),
retypeNewPassword: z.string().optional(),
})
.superRefine((data, ctx) => {