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

isUrl return true when i enter an email #1881

Closed
irlanvi opened this issue Dec 5, 2021 · 2 comments
Closed

isUrl return true when i enter an email #1881

irlanvi opened this issue Dec 5, 2021 · 2 comments

Comments

@irlanvi
Copy link

irlanvi commented Dec 5, 2021

Describe the bug
I try to validate an url and enter some random email, but I've got true as the result which in reality must be false, (I don't really know, maybe some rules has been changed), but i need an explanation about this.

Examples
`const validator = require("validator");

console.log(validator.isURL("irlan@gmail.com"));
// This return true`

Additional context
Validator.js version: 13.7.0
Node.js version: 16.13.0
OS platform: Windows 10

@tux-tn
Copy link
Member

tux-tn commented Dec 5, 2021

Thank you for your report,

It's considered valid per-spec since irlan here can be considered an username in http auth. Please check the discussion in #1751 . You can pass disallow_auth: true to get the old behaviour.

@pano9000
Copy link
Contributor

thanks for reporting, but I am closing this as invalid, as @tux-tn has outlined above.

@pano9000 pano9000 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2023
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

3 participants