Skip to content

Commit 45b6669

Browse files
committed
change regex to not match on newline characters - before users could potentially add their email, then garbage on a newline, which would still evaluate as valid
1 parent 48774f8 commit 45b6669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/components/email-input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default Component.extend({
2828
let user = this.get('user');
2929

3030
let emailIsProperFormat = function(userEmail) {
31-
let regExp = /\S+@\S+\.\S+/;
31+
let regExp = /^\S+@\S+\.\S+$/;
3232
return regExp.test(userEmail);
3333
};
3434

0 commit comments

Comments
 (0)