Return an ErrorList of errors that aren't associated with a particular field -- i.e., from Form.clean(). Return an empty ErrorList if there are none.
(self)
| 251 | } |
| 252 | |
| 253 | def non_field_errors(self): |
| 254 | """ |
| 255 | Return an ErrorList of errors that aren't associated with a particular |
| 256 | field -- i.e., from Form.clean(). Return an empty ErrorList if there |
| 257 | are none. |
| 258 | """ |
| 259 | return self.errors.get( |
| 260 | NON_FIELD_ERRORS, |
| 261 | self.error_class(error_class="nonfield", renderer=self.renderer), |
| 262 | ) |
| 263 | |
| 264 | def add_error(self, field, error): |
| 265 | """ |