You can also use quite elegant add_error() method. Works for Django >= 1.7.
If you set field as None form will treat the error as “non_field” one.
So:
form.add_error(None, "I'm non-field error")
works like a charm.
You can also use quite elegant add_error() method. Works for Django >= 1.7.
If you set field as None form will treat the error as “non_field” one.
So:
form.add_error(None, "I'm non-field error")
works like a charm.