mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-30 05:24:00 +03:00
Merge pull request #995 from pzinovkin/patch-1
Updated EmailField error message.
This commit is contained in:
commit
dbc8bddd74
|
@ -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]
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user