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

Validator 13.5.1 doesn't support 163/126 format email #1543

Closed
andyli9449 opened this issue Dec 1, 2020 · 11 comments
Closed

Validator 13.5.1 doesn't support 163/126 format email #1543

andyli9449 opened this issue Dec 1, 2020 · 11 comments

Comments

@andyli9449
Copy link

andyli9449 commented Dec 1, 2020

Describe the bug
A clear and concise description of what the bug is.
validator 13.5.1 doesn't support 163/126 format email such as hello@163.com or hello@126.com
163/126 is Netease email service。It is very popular in China
validator 13.1.1 can support 163/126

Examples
If applicable, add screenshots to help explain your problem.
code: validator_mail.js

'use strict';
  
const validator = require('validator');
console.log(validator.isEmail(process.argv[2]));

13.5.1 test case:

npm install validator@13.5.1
node validator_mail.js hello_test@163.com
false

13.1.1 test case:

npm install validator@13.1.1
node validator_mail.js hello_test@163.com
true

Additional context
Validator.js version: 13.5.1
Node.js version:v11.2.0
OS platform: [windows, linux, macOS, etc] linux Ubuntu 18.04.1 LTS

@josephtannenbaum
Copy link

We're also seeing this issue-- emails where the domain name is just numbers are now considered invalid.

@josephtannenbaum
Copy link

josephtannenbaum commented Dec 1, 2020

Here's the problem I think: https://github.com/validatorjs/validator.js/pull/1474/files#diff-3b6763f98d8f87da73f519e2f3e4c0adea82d001683f51e1c7beba87f6782b0eR37

@CristhianMotoche is not testing the TLD because it was poped on line 26 😅

@profnandaa
Copy link
Member

@CristhianMotoche -- can look into this?

@CristhianMotoche
Copy link
Contributor

Hi! I'll try to take a look at it later today.

@profnandaa
Copy link
Member

Cool, thanks!

@CristhianMotoche
Copy link
Contributor

I'm sorry, but I haven't had the time to check this. 😞
I hope to have some time to review it on the weekend.

@profnandaa
Copy link
Member

No worries, it's alright.

@CristhianMotoche
Copy link
Contributor

CristhianMotoche commented Dec 5, 2020

Hi! I was checking the issues and PRs and I think I'm late to fix this. It seems PR #1546 will address this and some additional fixes for isFQDN.

@tux-tn
Copy link
Member

tux-tn commented Dec 6, 2020

Sorry @CristhianMotoche i didn't see this issue and that you were assigned to fix it 😅

@CristhianMotoche
Copy link
Contributor

No worries. Actually, thanks for solving it. 😄

@profnandaa
Copy link
Member

Fixed in #1546 -- will release this patch as a hotfix due to the regression.

profnandaa added a commit that referenced this issue Dec 10, 2020
- patch fixing #1545 #1543 and #1544
- ref PR #1546 by @tux-tn
profnandaa added a commit that referenced this issue Dec 10, 2020
- patch fixing #1545 #1543 and #1544
- ref PR #1546 by @tux-tn
profnandaa added a commit that referenced this issue Dec 10, 2020
- patch fixing #1545 #1543 and #1544
- ref PR #1546 by @tux-tn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants