Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localhost and localhost. are valid domains, but give ValidationFailure #185

Closed
milahu opened this issue Dec 31, 2020 · 3 comments · Fixed by #242
Closed

localhost and localhost. are valid domains, but give ValidationFailure #185

milahu opened this issue Dec 31, 2020 · 3 comments · Fixed by #242
Labels
duplicate Issue/PR: Redundant enhancement Issue/PR: A new feature outdated Issue/PR: Open for more than 3 months

Comments

@milahu
Copy link

milahu commented Dec 31, 2020

import validators
validators.domain('localhost') # -> ValidationFailure
validators.domain('localhost.') # -> ValidationFailure

refs

edit: or does 'domain' mean 'fully qualified domain name'? (fqdn)
then 'localhost' is invalid

@stevecj
Copy link

stevecj commented Jun 23, 2021

Regardless of the intention of this method with regard to local vs Internet domains, it would be very nice to have a way to specify what is desired. Either additional validation functions or additional arguments to say whether names without any dot separators should be valid and whether IPv4 addresses should be valid and whether IPv6 addresses should be valid.

@blakev
Copy link

blakev commented Nov 23, 2021

@stevecj makes a good point. The url validation function doesn't work as expected.

@yozachar yozachar added the enhancement Issue/PR: A new feature label Mar 2, 2023
@yozachar
Copy link
Collaborator

yozachar commented Mar 2, 2023

related: #142

@yozachar yozachar added duplicate Issue/PR: Redundant outdated Issue/PR: Open for more than 3 months labels Mar 11, 2023
yozachar added a commit to yozachar/pyvalidators that referenced this issue Mar 14, 2023
- Moves port validator to its own function

**Related items**

*Issues*

- Closes python-validators#185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issue/PR: Redundant enhancement Issue/PR: A new feature outdated Issue/PR: Open for more than 3 months
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants