#NEWLINE# def pre_validate( self , form ) : #NEWLINE# #INDENT# if ( self . _is_uploaded_file ( self . data ) and ( not self . is_file_allowed ( self . data . filename ) ) ) : #NEWLINE# #INDENT# raise ValidationError ( gettext ( 'Invalid file extension' ) )