summaryrefslogtreecommitdiff
path: root/docs/ref/forms
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/forms')
-rw-r--r--docs/ref/forms/validation.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/docs/ref/forms/validation.txt b/docs/ref/forms/validation.txt
index bb9a928c1a..b57f44cb6c 100644
--- a/docs/ref/forms/validation.txt
+++ b/docs/ref/forms/validation.txt
@@ -263,19 +263,16 @@ containing comma-separated email addresses. The full class looks like this::
class MultiEmailField(forms.Field):
def to_python(self, value):
- "Normalize data to a list of strings."
-
+ """Normalize data to a list of strings."""
# Return an empty list if no input was given.
if not value:
return []
return value.split(',')
def validate(self, value):
- "Check if value consists only of valid emails."
-
+ """Check if value consists only of valid emails."""
# Use the parent's handling of required fields, etc.
super(MultiEmailField, self).validate(value)
-
for email in value:
validate_email(email)