Ticket #12001: 12001.diff
File 12001.diff, 1.0 KB (added by , 15 years ago) |
---|
-
docs/ref/forms/validation.txt
321 321 effectively in your particular situation. Our new code (replacing the previous 322 322 sample) looks like this:: 323 323 324 from django.forms.util import ErrorList325 326 324 class ContactForm(forms.Form): 327 325 # Everything as before. 328 326 ... … … 336 334 # We know these are not in self._errors now (see discussion 337 335 # below). 338 336 msg = u"Must put 'help' in subject when cc'ing yourself." 339 self._errors["cc_myself"] = ErrorList([msg])340 self._errors["subject"] = ErrorList([msg])337 self._errors["cc_myself"] = self.error_class([msg]) 338 self._errors["subject"] = self.error_class([msg]) 341 339 342 340 # These fields are no longer valid. Remove them from the 343 341 # cleaned data.