Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #5166 -- Fixed a validation problem in one of the examples. Tha…


git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 04c77db commit 24081d995962d14388bf98c1c572603ffd1beeb6 @malcolmt malcolmt committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/newforms.txt
4 docs/newforms.txt
@@ -1419,12 +1419,12 @@ keep it simple and assume e-mail validation is contained in a function called
class MultiEmailField(forms.Field):
def clean(self, value):
+ if not value:
+ raise forms.ValidationError('Enter at least one e-mail address.')
emails = value.split(',')
for email in emails:
if not is_valid_email(email):
raise forms.ValidationError('%s is not a valid e-mail address.' % email)
- if not emails:
- raise forms.ValidationError('Enter at least one e-mail address.')
return emails
Let's alter the ongoing ``ContactForm`` example to demonstrate how you'd use

0 comments on commit 24081d9

Please sign in to comment.
Something went wrong with that request. Please try again.