From 86a4ed0398087be1559430a7b91e65cbbd1faf77 Mon Sep 17 00:00:00 2001 From: tracyyh Date: Sun, 20 Oct 2024 14:28:18 -0400 Subject: [PATCH] add email validation --- packages/trpc/src/procedures/auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/trpc/src/procedures/auth.ts b/packages/trpc/src/procedures/auth.ts index 53de346..2509908 100644 --- a/packages/trpc/src/procedures/auth.ts +++ b/packages/trpc/src/procedures/auth.ts @@ -8,7 +8,7 @@ import { baseProcedureBuilder } from "../internal/init"; export const signUpProcedure = baseProcedureBuilder .input( z.object({ - email: z.string(), + email: z.string().email(), password: z.string(), }), ) @@ -53,7 +53,7 @@ export const signUpProcedure = baseProcedureBuilder export const signInProcedure = baseProcedureBuilder .input( z.object({ - email: z.string(), + email: z.string().email(), password: z.string(), }), ) @@ -117,7 +117,7 @@ export const signOutProcedure = baseProcedureBuilder export const deleteAccountIfExistsProcedure = baseProcedureBuilder .input( z.object({ - email: z.string(), + email: z.string().email(), }), ) .mutation(async ({ ctx, input }) => {