Ticket #6138: svn.diff

File svn.diff, 878 bytes (added by Michal Moroz, 17 years ago)

A simple patch

  • django/newforms/forms.py

     
    188188                    value = getattr(self, 'clean_%s' % name)()
    189189                    self.cleaned_data[name] = value
    190190            except ValidationError, e:
    191                 self._errors[name] = e.messages
     191                self._errors[name] = self.error_class(e.messages)
    192192                if name in self.cleaned_data:
    193193                    del self.cleaned_data[name]
    194194        try:
    195195            self.cleaned_data = self.clean()
    196196        except ValidationError, e:
    197             self._errors[NON_FIELD_ERRORS] = e.messages
     197            self._errors[NON_FIELD_ERRORS] = self.error_class(e.messages)
    198198        if self._errors:
    199199            delattr(self, 'cleaned_data')
    200200
Back to Top