diff --git a/app/utils/user-validation.ts b/app/utils/user-validation.ts index 0efe657..8613802 100644 --- a/app/utils/user-validation.ts +++ b/app/utils/user-validation.ts @@ -23,6 +23,7 @@ export const emailSchema = z .email({ message: 'Email is invalid' }) .min(3, { message: 'Email is too short' }) .max(100, { message: 'Email is too long' }) + .transform(email => email.toLowerCase()) export const phoneSchema = z .string() diff --git a/tests/e2e/onboarding.test.ts b/tests/e2e/onboarding.test.ts index ac50f1e..ed73e34 100644 --- a/tests/e2e/onboarding.test.ts +++ b/tests/e2e/onboarding.test.ts @@ -114,7 +114,7 @@ test('onboarding with a short code', async ({ page }) => { name: `${firstName} ${lastName}`, username, phone, - email: `${username}@example.com`, + email: `${username}@example.com`.toLowerCase(), password: faker.internet.password(), }