-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 for e-mail #1674
Comments
I was going to submit a PR to fix this, but then I saw these tests... validator.js/test/validators.js Lines 672 to 688 in 907bb07
It seems that you can set the |
Hi, Thank you. I will try it. I would expect default behaviour with |
@ezkemboi can i work on this issue |
@raghavbk if you have a PR, please do it and we will review it. Thanks. |
@mjancarik user@example.com : This will treated as an email due to the presence of " @ " in it , so I think its bound to return true to this |
In no way is an email address a URL, as someone claimed in an issue.
|
Well, till someone figure out which way is the correct way, doing this works for everyone else: validator.isURL('xyz@xyz.net', { disallow_auth: true }); // false |
Describe the bug
Hi,
What is the correct behaviour for
isURL
function when I give e-mail address? I would expect that return false.Examples
An example from the Node REPL:
Additional context
Validator.js version: 13.6.0
Node.js version: 14.16.0
OS platform: macOS
The text was updated successfully, but these errors were encountered: