From 3780bf13f7dc211f80a5deec3af41ee9f1d39a06 Mon Sep 17 00:00:00 2001 From: Timothy-Gonzalez <105177619+Timothy-Gonzalez@users.noreply.github.com> Date: Sun, 12 Jan 2025 13:32:08 -0600 Subject: [PATCH] Allow empty string placeholder for email --- src/services/registration/registration-schemas.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/registration/registration-schemas.ts b/src/services/registration/registration-schemas.ts index d737fb86..a7b31a38 100644 --- a/src/services/registration/registration-schemas.ts +++ b/src/services/registration/registration-schemas.ts @@ -190,7 +190,8 @@ export const RegistrationApplicationRequestSchema = z isProApplicant: z.boolean(), preferredName: z.string(), legalName: z.string(), - emailAddress: z.string().email({ message: "Invalid email syntax." }), + // Email address needs to allow empty string as placeholder value. Ideally we change this in the future, but this is a temp fix. + emailAddress: z.union([z.string().email({ message: "Invalid email syntax." }), z.literal("")]), gender: GenderSchema, race: z.array(RaceSchema), resumeFileName: z.string().optional(),