Skip to content

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

@komarovalexander

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

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