This way you’re throwing a non field form validation message. If you want to throw a field specific validation message from a clean method you need to pass a dictionary to `forms.ValidationError’, like this:
def clean(self):
raise forms.ValidationError({"some_field": "raise an error"})
You’re probably missing {{ form.errors }} in your template.
If you do the equivalent of a non-field error, self.add_error(None, "some message"), that shouldn’t display either until you show the errors in your template.
I am not sure it’s worth directly showing the template code - not every project uses’ forms built-in rendering. I guess this sentence could be slightly expanded to mention non_field_errors, and how you should ensure they’re displayed:
In this code, if the validation error is raised, the form will display an error message at the top of the form (normally) describing the problem.
If you open a PR please add a comment with @adamchainz so I see it