Implement email change

This commit is contained in:
adilallo committed 2026-04-26 07:47:25 -06:00
1 parent 68517796a9
commit 0ce05372bf
15 files changed
+1072 -13

No files matched your search

@@ -0,0 +1,15 @@
import { z } from "zod";
/** POST `/api/user/email-change/request` body (CR-103). */
export const emailChangeRequestBodySchema = z.object({
newEmail: z
.string()
.trim()
.min(1, "Email is required")
.transform((s) => s.toLowerCase())
.pipe(z.string().email({ message: "Valid email required" })),
});
export type EmailChangeRequestBody = z.infer<
typeof emailChangeRequestBodySchema
>;