#NEWLINE# def validate( self , job_directory , string ) : #NEWLINE# #INDENT# regex = ( '^%s$' % self . _expression_to_regex ( job_directory , self . xml_el ) ) #NEWLINE# match = compile ( regex ) . match ( string ) #NEWLINE# validated = ( match is not None ) #NEWLINE# if validated : #NEWLINE# #INDENT# for group in match . groups ( ) : #NEWLINE# #INDENT# if ( ( not in_directory ( group , join ( job_directory . path , 'inputs' ) ) ) and ( not in_directory ( group , join ( job_directory . path , 'outputs' ) ) ) ) : #NEWLINE# #INDENT# validated = False #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return validated