﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21339	"Form error message ""required"" instead of ""invalid"""	Eduardo Klein	nobody	"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.
"	Cleanup/optimization	closed	Forms	1.6-beta-1	Release blocker	fixed	form error_message		Accepted	1	0	0	1	0	0
