#21339: Form error message "required" instead of "invalid"
----------------------------+--------------------------------
     Reporter:  duduklein   |      Owner:  nobody
         Type:  Bug         |     Status:  new
    Component:  Forms       |    Version:  1.6-beta-1
     Severity:  Normal      |   Keywords:  form error_message
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0           |      UI/UX:  0
----------------------------+--------------------------------
 Install the django-custom-user (pip install django-custom-user). The
 source code is at https://github.com/recreatic/django-custom-user

 Add 'custom_user' to INSTALLED_APPS and set AUTH_USER_MODEL =
 'custom_user.EmailUser'

 Run ./manage.py test custom_user

 The test custom_user.tests.EmailUserCreationFormTest.test_invalid_data
 fails. Here is the code:


 {{{
 data = {
         'email': 'testclient',
         'password1': 'test123',
         'password2': 'test123',
        }
 form = EmailUserCreationForm(data)
 self.assertFalse(form.is_valid())
 self.assertEqual(form["email"].errors,
 [force_text(form.fields['email'].error_messages['invalid'])])

 }}}

 In Django 1.6c1,
 {{{
 form.fields['email'].error_messages
 }}}
  has 'required' as a key and its corresponding message instead of
 'invalid' and its corresponding message.

 In Django 1.5.5, it works fine.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21339>
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/052.c71d08cb71cca18f6c8ea30e0a6ef0b7%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to