diff --git a/src/create-reminder-signup/lambda/models.ts b/src/create-reminder-signup/lambda/models.ts index a19469b..eae819e 100644 --- a/src/create-reminder-signup/lambda/models.ts +++ b/src/create-reminder-signup/lambda/models.ts @@ -47,12 +47,13 @@ const reminderStageSchema = z.union([ export type ReminderStage = 'PRE' | 'POST' | 'WINBACK'; export const baseSignupRequestSchema = z.object({ - // Identity’s guest creation endpoint errors if the provided email address is more than 100 characters long email: z .string() + // Identity’s guest creation endpoint errors if the provided email address is more than 100 characters long + .max(100) // The API gateway -> SQS integration encodes + as a space in the email string .transform((email) => email.replace(' ', '+')) - .pipe(z.string().max(100).email()), + .pipe(z.string().email()), country: z.string().optional(), reminderCreatedAt: z.string().datetime().optional(), reminderPlatform: reminderPlatformSchema,