#28572: Form URLField validation fails with valid URL
------------------------------+--------------------------------------
     Reporter:  Jani Tiainen  |                    Owner:  nobody
         Type:  Bug           |                   Status:  new
    Component:  Forms         |                  Version:  1.11
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+--------------------------------------
Description changed by Jani Tiainen:

Old description:

> Given valid URL http://myapp:8080/ does not validate as valid url.
> Happens on 1.8 and 1.11 at least.
>
> {{{
> #!python
> # -*- 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())
> }}}

New description:

 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.

 {{{
 #!python
 # -*- 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())
 }}}

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28572#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.229ad8b38da3c5c3c44bdb7534cad4a2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to