Skip to content
New issue

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

added normalisation for yandex based emails #807

Merged
merged 2 commits into from
May 3, 2018

Conversation

vodolaz095
Copy link
Contributor

No description provided.

@vodolaz095
Copy link
Contributor Author

Yandex mail provider (top 2nd in Russia) offers this domains

  'yandex.ru',
  'yandex.ua',
  'yandex.kz',
  'yandex.com',
  'yandex.by',
  'ya.ru',

but they all are aliases of the same yandex.ru domain.
aka if i send to [email protected], it is actually delivered to [email protected].

See proofs:
rryuyrg8v

my mailbox exists on all domains.

@chriso chriso merged commit 5e2cf36 into validatorjs:master May 3, 2018
@chriso
Copy link
Collaborator

chriso commented May 3, 2018

Thanks for the PR 😄

@@ -129,6 +132,11 @@ function normalizeEmail(email, options) {
if (options.all_lowercase || options.yahoo_lowercase) {
parts[0] = parts[0].toLowerCase();
}
} else if (~yandex_domains.indexOf(parts[1])) {
if (options.all_lowercase || options.yahoo_lowercase) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! Thanks for the PR :)
I think it shouldn't use options.yahoo_lowercase because this option is for yahoo case only

chriso added a commit that referenced this pull request May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants