Closed k4zh closed 2 years ago
Looking at the source of validator.isEmail
(see https://github.com/validatorjs/validator.js/blob/cfcf9113c69b97477c409909a8729fa8efa0d595/src/lib/isEmail.js#L162-L170), it looks like they split by period to check local parts, and with each split, they test the user pattern. If any parts are not valid, then it rejects it and returns false. We added \\.
to our regular expressions and also added a test.
This has been fixed and released in v2.0.0.
https://github.com/spamscanner/email-regex-safe/releases/tag/v2.0.0
Thanks for filing this issue @k4zh
Hi,
Thank you for your lib.
But using
emailRegexSafe({ gmail: false }).exec('bob.foo-bar@test.com')
, onlyfoo-bar@test.com
matches.Is that expected behavior?