Skip to content

Underscores in URLs seem to break the validator #102

Closed

Description

@chalbersma

URLs can have underscores in the subdomain and be valid. https://stackoverflow.com/questions/2180465/can-domain-name-subdomains-have-an-underscore-in-it URLs with underscores are incorrectly identified as not being URLs.

Example of the failure :

>>> validators.url("https://sample_subdomain.example.com")
ValidationFailure(func=url, args={'value': 'https://sample_subdomain.example.com', 'public': False})
>>> validators.url("https://sample-subdomain.example.com")
True

Activity

  1. chalbersma commented on Dec 5, 2018

    @chalbersma
    Author

    I'm not sure where exactly this would need to be added to the pattern but I assume it's somewhere here : https://github.com/kvesteri/validators/blob/master/validators/url.py#L74

  2. added
    bugIssue: Works not as designed
    outdatedIssue/PR: Open for more than 3 months
    on Mar 14, 2023
  3. added a commit that references this issue on Mar 17, 2023
    c43826c
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

    bugIssue: Works not as designedoutdatedIssue/PR: Open for more than 3 months

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions