Skip to content

Commit 8a467d8

Browse files
committed
fix: Add arg gmail_remove_subaddress to .normalizeEmail
1 parent 8990c1b commit 8a467d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/validators/user.api.validator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ async function validateCreateUserAPICall(req, res, next) {
66
await body('email', 'Invalid email')
77
.exists()
88
.isEmail()
9-
.normalizeEmail({ gmail_remove_dots: false })
9+
.normalizeEmail({ gmail_remove_dots: false, gmail_remove_subaddress: false })
1010
.run(req);
1111

1212
// Finds the validation errors in this request and wraps them in an object with handy functions
@@ -22,7 +22,7 @@ async function validateSigninUserAPICall(req, res, next) {
2222
await body('email', 'Invalid email')
2323
.exists()
2424
.isEmail()
25-
.normalizeEmail({ gmail_remove_dots: false })
25+
.normalizeEmail({ gmail_remove_dots: false, gmail_remove_subaddress: false })
2626
.run(req);
2727

2828
// Finds the validation errors in this request and wraps them in an object with handy functions

0 commit comments

Comments
 (0)