Simon Litchfield schrieb:
> I tend to think there needs to be a documented, 'clean' way of adding
> non_field_errors (and even field errors too) to forms, *outside* the
> clean() methods.
>
>
I had this idea some time ago, too. There is a patch
with documentation and unittest:
http://code.dja
Instead of --
form.errors['my_file_field'] = forms.util.ErrorList([u'Some error in
processing file'])
Maybe something more like --
form.add_error('Some error in processing file', 'my_file_field')
And with a nice simple default to non_field_errors --
form.add_error('A general form error message')
I tend to think there needs to be a documented, 'clean' way of adding
non_field_errors (and even field errors too) to forms, *outside* the
clean() methods.
Currently, I believe the only 'right' way to add errors is by raising
a ValidationError. This is suitable for 'contained' and relatively
simp