Opened 7 years ago

Last modified 7 years ago

#28572 closed Bug

Form URLField validation fails with valid URL — at Version 1

Reported by: Jani Tiainen Owned by: nobody
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 Jani Tiainen)

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 (1)

comment:1 by Jani Tiainen, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top