-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Fixed #18119 -- Added a DomainNameValidator validator. #3477
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
Fixed #18119 -- Added a DomainNameValidator validator. #3477
Conversation
django/core/validators.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will overwrite an explicitly given message if you use
validator = DomainNameValidator(accept_idna=True, message='Only IDNA domain allowed')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Good catch, thanks.
This probably clashes with #2873. |
This is ready for a rebase and update now that the related PR has been merged. |
Please send a new PR if someone can update this. |
@timgraham by update you mean rebase ? |
Correct |
Unfortunately, rebasing this is not enough:
|
Any updates on this? By the way, I disagree with this:
An IDN is also a valid domain name. |
Yes, it is, but I'm not sure it's common enough to make it a default behavior. After the discussion on the django-developers list, I'd even prefer to remove it in order to have a simpler implementation. I will address my comments in #3477 (comment) and send a pull request. Thanks for the ping! |
Is there any follow up on this ? |
Thanks for the ping. I thought I already have opened a PR for this :/ Will open a PR this week. |
I've opened #7300 as a follow-up. |
https://code.djangoproject.com/ticket/18119