newforms: Changed ChoiceField error message *not* to include user-provided input
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4460 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
795de3a67c
commit
04c4a031ba
|
@ -356,7 +356,7 @@ class ChoiceField(Field):
|
||||||
return value
|
return value
|
||||||
valid_values = set([str(k) for k, v in self.choices])
|
valid_values = set([str(k) for k, v in self.choices])
|
||||||
if value not in valid_values:
|
if value not in valid_values:
|
||||||
raise ValidationError(gettext(u'Select a valid choice. %s is not one of the available choices.') % value)
|
raise ValidationError(gettext(u'Select a valid choice. That choice is not one of the available choices.'))
|
||||||
return value
|
return value
|
||||||
|
|
||||||
class MultipleChoiceField(ChoiceField):
|
class MultipleChoiceField(ChoiceField):
|
||||||
|
|
Loading…
Reference in New Issue