#NEWLINE# def clean_username( self ) : #NEWLINE# #INDENT# username = self . cleaned_data . get ( 'username' ) #NEWLINE# if ( self == 'customform' ) : #NEWLINE# #INDENT# raise forms . ValidationError ( 'custom form error' ) #NEWLINE# #UNINDENT# return username