Opened 7 years ago
Closed 7 years ago
#28572 closed Bug (duplicate)
URLValidator rejects host without tld
Reported by: | Jani Tiainen | Owned by: | Denis.Tarykin |
---|---|---|---|
Component: | Core (Other) | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Given valid URL http://myapp:8080/ does not validate as valid url. Happens on 1.8 and 1.11 at least. Note that at if I change localhost in myapp place, URL validates.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase from django import forms class TestForm(forms.Form): url = forms.URLField() class UrlTestCase(TestCase): def test_form(self): form = TestForm({'url': 'http://myapp:8080/'}) self.assertTrue(form.is_valid())
Change History (3)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 7 years ago
Component: | Forms → Core (Other) |
---|---|
Resolution: | → duplicate |
Status: | assigned → closed |
Summary: | Form URLField validation fails with valid URL → URLValidator rejects host without tld |
Note:
See TracTickets
for help on using tickets.
Duplicate of #25418.