Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a problem with translatable strings from [5686].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b8eee39e7873c888f0335bf0af6c4011550499a8 1 parent f2a45f9
@malcolmt malcolmt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/newforms/fields.py
View
4 django/newforms/fields.py
@@ -113,9 +113,9 @@ def clean(self, value):
value = smart_unicode(value)
value_length = len(value)
if self.max_length is not None and value_length > self.max_length:
- raise ValidationError(ugettext(u'Ensure this value has at most %d characters (it has %d).') % (self.max_length, value_length))
+ raise ValidationError(ugettext(u'Ensure this value has at most %(max)d characters (it has %(length)d).') % {'max': self.max_length, 'length': value_length})
if self.min_length is not None and value_length < self.min_length:
- raise ValidationError(ugettext(u'Ensure this value has at least %d characters (it has %d).') % (self.min_length, value_length))
+ raise ValidationError(ugettext(u'Ensure this value has at least %(min)d characters (it has %(length)d).') % {'min': self.min_length, 'length': value_length})
return value
def widget_attrs(self, widget):
Please sign in to comment.
Something went wrong with that request. Please try again.