We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Thank you for your lib.
const validator = require('validator'); console.log(validator.isEmail('bob.foo-bar@test.com')); // true
But using emailRegexSafe({ gmail: false }).exec('bob.foo-bar@test.com'), only foo-bar@test.com matches.
emailRegexSafe({ gmail: false }).exec('bob.foo-bar@test.com')
foo-bar@test.com
Is that expected behavior?
The text was updated successfully, but these errors were encountered:
d7a1eac
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.
validator.isEmail
\\.
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
Sorry, something went wrong.
No branches or pull requests
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?
The text was updated successfully, but these errors were encountered: