Merge pull request #995 from pzinovkin/patch-1

Updated EmailField error message.
This commit is contained in:
Stephan Groß 2013-07-24 02:00:30 -07:00
commit dbc8bddd74
2 changed files with 2 additions and 2 deletions

View File

@ -512,7 +512,7 @@ class EmailField(CharField):
form_field_class = forms.EmailField
default_error_messages = {
'invalid': _('Enter a valid e-mail address.'),
'invalid': _('Enter a valid email address.'),
}
default_validators = [validators.validate_email]

View File

@ -494,7 +494,7 @@ class CustomValidationTests(TestCase):
}
serializer = self.CommentSerializerWithFieldValidator(data=wrong_data)
self.assertFalse(serializer.is_valid())
self.assertEqual(serializer.errors, {'email': ['Enter a valid e-mail address.']})
self.assertEqual(serializer.errors, {'email': ['Enter a valid email address.']})
class PositiveIntegerAsChoiceTests(TestCase):