Skip to content

Commit

Permalink
Merge pull request #39 from parkerdavis1/email-lowercase
Browse files Browse the repository at this point in the history
Store emails in all lowercase
  • Loading branch information
gregv authored Dec 22, 2023
2 parents e73eec4 + 73cfdd0 commit 86226ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/utils/user-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/onboarding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}

Expand Down

0 comments on commit 86226ac

Please sign in to comment.