﻿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
23150	RegexField invalid message_error returns error list.	e2jeyy@…	nobody	"I encountered an issue when using the RegexField as seen below:

{{{
>>> from django import forms
>>> username = forms.RegexField(regex=r'^[\w]+$', error_message={'invalid': 'Does not meet requirement'})
>>> username.clean('foo.bar')
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""/Users/EJey/Documents/virtualenvs/mysocialenv/lib/python2.7/site-packages/django/forms/fields.py"", line 150, in clean
    self.run_validators(value)
  File ""/Users/EJey/Documents/virtualenvs/mysocialenv/lib/python2.7/site-packages/django/forms/fields.py"", line 139, in run_validators
    raise ValidationError(errors)
ValidationError: [u""{'invalid': 'Does not meet requirement'}""]
}}}

What should be returned is: ValidationError: [u'Does not meet requirement'] without the curly braces and the information about the type of error.
From the djanago source there is a comment under the RegexField that states # error_message is just kept for backwards compatibility This is clearly not the case."	Bug	closed	Forms	1.6	Normal	invalid	RegexField		Unreviewed	0	0	0	0	0	0
