Skip to content

Commit

Permalink
fix: replace all dots in gmail length validation
Browse files Browse the repository at this point in the history
  • Loading branch information
DasDingGehtNicht committed Aug 30, 2021
1 parent 8c4b3b3 commit d0aa34a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isEmail.js
Expand Up @@ -110,7 +110,7 @@ export default function isEmail(str, options) {
const username = user.split('+')[0];

// Dots are not included in gmail length restriction
if (!isByteLength(username.replace('.', ''), { min: 6, max: 30 })) {
if (!isByteLength(username.replace(/\./g, ''), { min: 6, max: 30 })) {
return false;
}

Expand Down

0 comments on commit d0aa34a

Please sign in to comment.