Validate Url Issues
meirroth opened this issue · comments
Meir Roth commented
Two issues found with the Validate Url algorithm:
- A string is considered to be valid URL if it starts with www. even though it does not have https
validateUrl('www.google.com')
// returns truevalidateUrl('google.com')
// returns false
- A valid URL returns false if starts with www like:
validateUrl('https://wwwdomain.com')
// returns false
Subham Bhattacharjee commented
Can i try this
Lars Müller commented
Can i try this
No (see the current PR).
Harsh Gupta commented
is it still open?
Lars Müller commented
Yesn't? The solution might be a removal of the "algorithm" though.
TrasherDK commented
Hmm. None of those test cases are valid email addresses.
validateEmail('www.google.com')
// returns true ❓
Meir Roth commented
@trasherdk Oops... It's a typo. Should say validateUrl('www.google.com')
.
Fixed now.
Aditya Naresh commented
Is this issue still open?
Lars Müller commented
Is this issue still open?
Yes, but bear in mind that validating URLs is much more complex than presented here:
0-harshit-0 commented
hello, I would like to work on this.