diff options
Diffstat (limited to 'docs/ref/forms/validation.txt')
| -rw-r--r-- | docs/ref/forms/validation.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/ref/forms/validation.txt b/docs/ref/forms/validation.txt index c19ae34c29..5f6db434f8 100644 --- a/docs/ref/forms/validation.txt +++ b/docs/ref/forms/validation.txt @@ -363,8 +363,10 @@ example:: if cc_myself and subject: # Only do something if both fields are valid so far. if "help" not in subject: - raise forms.ValidationError("Did not send for 'help' in " - "the subject despite CC'ing yourself.") + raise forms.ValidationError( + "Did not send for 'help' in the subject despite " + "CC'ing yourself." + ) 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. |
