Skip to content

Validate Url Issues #1183

Description

@meirroth

Two issues found with the Validate Url algorithm:

  1. 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 true
  • validateUrl('google.com') // returns false
  1. A valid URL returns false if starts with www like:
  • validateUrl('https://wwwdomain.com') // returns false

Activity

  1. SubhamB2003 commented on Oct 16, 2022

    @SubhamB2003

    Can i try this

  2. appgurueu commented on Oct 16, 2022

    @appgurueu
    Collaborator

    Can i try this

    No (see the current PR).

  3. 609harsh commented on Oct 19, 2022

    @609harsh

    is it still open?

  4. appgurueu commented on Oct 19, 2022

    @appgurueu
    Collaborator

    Yesn't? The solution might be a removal of the "algorithm" though.

  5. trasherdk commented on Oct 27, 2022

    @trasherdk
    Contributor

    Hmm. None of those test cases are valid email addresses.

    validateEmail('www.google.com') // returns true ❓

  6. meirroth commented on Oct 27, 2022

    @meirroth
    Author

    @trasherdk Oops... It's a typo. Should say validateUrl('www.google.com').
    Fixed now.

  7. Aditya-Naresh commented on Apr 16, 2023

    @Aditya-Naresh

    Is this issue still open?

  8. appgurueu commented on Apr 16, 2023

    @appgurueu
    Collaborator

    Is this issue still open?

    Yes, but bear in mind that validating URLs is much more complex than presented here:

    URL syntax diagram

    (from https://en.wikipedia.org/wiki/URL)

  9. 0-harshit-0 commented on Jul 5, 2023

    @0-harshit-0
    Contributor

    hello, I would like to work on this.

  10. added a commit that references this issue on Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions