Skip to content

Commit

Permalink
fix(email): update pattern to forbid spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-sanders-cc committed Dec 1, 2022
1 parent ffd55ad commit 30cbfbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function validateEmailAddress (address) {
if (address == null || address === '') {
return 'empty';
}
if (!address.match(/\S+@\S+\.\S+/gm)) {
if (!address.match(/^\S+@\S+\.\S+$/gm)) {
return 'invalid';
}

Expand Down

0 comments on commit 30cbfbd

Please sign in to comment.