add password and newPassword to editUserValidation

This commit is contained in:
Alex Holliday committed 2026-05-15 10:58:38 -07:00
1 parent 72f23ca025
commit f46c2edd1b
1 file changed
+10
+10
View File
@@ -49,6 +49,16 @@ export const editUserBodyValidation = z.object({
lastName: nameValidation.optional(),
email: lowercaseEmailValidation.optional(),
profilePicture: z.string().optional(),
password: z
.string()
.min(8, "Password must be at least 8 characters")
.regex(passwordPattern, "Password must contain at least one lowercase letter, one uppercase letter, one number, and one special character")
.optional(),
newPassword: z
.string()
.min(8, "Password must be at least 8 characters")
.regex(passwordPattern, "Password must contain at least one lowercase letter, one uppercase letter, one number, and one special character")
.optional(),
});
// Canonical user shape returned by auth/user endpoints. Keep aligned with what