Skip to content

url validation is passed for values without protocol at the beginning but with www. #334

Description

@komarovalexander

Hello could you explain why "www.ka-table.com" is a valid url? - it does not have protocol https:// - should it be invalid?

const regex = `(?:${protocol}|www\\.)${auth}(?:localhost|${ipv4}|${ipv6}|${host}${domain}${tld})${port}${path}`;

expected:
"www.ka-table.com" - invalid
"https://www.ka-table.com" - valid

thanks

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions