Skip to content

Commit

Permalink
Update regex e-mail
Browse files Browse the repository at this point in the history
Allow a dash in the domain name, e.g., `[email protected]`.
Might want to use some e-mail parsing library for this instead, but this at least fixes this oversight.
  • Loading branch information
PGijsbers authored Apr 10, 2024
1 parent bdb2f78 commit 8ca9284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/client/app/src/pages/auth/SignUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function SignUp() {
setError(true);
setErrorMessage("Password too weak");
} else if (
/[a-zA-Z0-9]+@(?:[a-zA-Z0-9]+\.)+[A-Za-z]+$/.test(
/[a-zA-Z0-9]+@(?:[a-zA-Z0-9-]+\.)+[A-Za-z]+$/.test(
event.target.email.value
) !== true
) {
Expand Down

0 comments on commit 8ca9284

Please sign in to comment.