#NEWLINE# def clean( self ) : #NEWLINE# #INDENT# 'Checks that no two email addresses are the same.' #NEWLINE# if any ( self . errors ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# emails = [ ] #NEWLINE# for i in range ( 0 , self . total_form_count ( ) ) : #NEWLINE# #INDENT# form = self . forms [ i ] #NEWLINE# email = form . cleaned_data [ 'email' ] #NEWLINE# if ( email in emails ) : #NEWLINE# #INDENT# raise ValidationError ( 'Forms in a set must have distinct email addresses.' ) #NEWLINE# #UNINDENT# emails . append ( email )