#NEWLINE# def __call__( self , value ) : #NEWLINE# #INDENT# if ( not self . re . search ( value ) ) : #NEWLINE# #INDENT# message = 'Value does not match pattern: "{0}"' . format ( self . pattern ) #NEWLINE# raise ValueError ( message ) #NEWLINE# #UNINDENT# return value