Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #2727 -- Fixed problem with serialising error messages from val…

…idation.

Thanks, Ivan Saglaev.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e0cec60a143cedaf99c781bad284ec3d794a956b 1 parent a6a4e9b
@malcolmt malcolmt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/forms/__init__.py
View
4 django/forms/__init__.py
@@ -2,7 +2,7 @@
from django.core.exceptions import PermissionDenied
from django.utils.html import escape
from django.conf import settings
-from django.utils.translation import gettext, gettext_lazy, ngettext
+from django.utils.translation import gettext, ngettext
FORM_FIELD_ID_PREFIX = 'id_'
@@ -343,7 +343,7 @@ def run_validator(self, new_data, validator):
def get_validation_errors(self, new_data):
errors = {}
if self.is_required and not new_data.get(self.field_name, False):
- errors.setdefault(self.field_name, []).append(gettext_lazy('This field is required.'))
+ errors.setdefault(self.field_name, []).append(gettext('This field is required.'))
return errors
try:
for validator in self.validator_list:
Please sign in to comment.
Something went wrong with that request. Please try again.