Code

Ticket #12001: 12001.diff

File 12001.diff, 1.0 KB (added by timo, 4 years ago)

ErrorList -> self.error_class

Line 
1Index: docs/ref/forms/validation.txt
2===================================================================
3--- docs/ref/forms/validation.txt       (revision 12294)
4+++ docs/ref/forms/validation.txt       (working copy)
5@@ -321,8 +321,6 @@
6 effectively in your particular situation. Our new code (replacing the previous
7 sample) looks like this::
8 
9-    from django.forms.util import ErrorList
10-
11     class ContactForm(forms.Form):
12         # Everything as before.
13         ...
14@@ -336,8 +334,8 @@
15                 # We know these are not in self._errors now (see discussion
16                 # below).
17                 msg = u"Must put 'help' in subject when cc'ing yourself."
18-                self._errors["cc_myself"] = ErrorList([msg])
19-                self._errors["subject"] = ErrorList([msg])
20+                self._errors["cc_myself"] = self.error_class([msg])
21+                self._errors["subject"] = self.error_class([msg])
22 
23                 # These fields are no longer valid. Remove them from the
24                 # cleaned data.