Skip to content

Commit

Permalink
adding regex for .com (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlkaede11 authored Oct 19, 2024
1 parent d17d321 commit 969768e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/store/SignUpForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const actions = {
const { email, confirmEmail, phone_number, emergency_contact } =
getState()
const validRegex =
/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]{2,}$/

if (!email.match(validRegex)) {
invalidFields.push("Email")
Expand Down

0 comments on commit 969768e

Please sign in to comment.