#NEWLINE# def validate( self , value ) : #NEWLINE# #INDENT# self . value_msg = value #NEWLINE# if ( self . property_type in scalarunit . ScalarUnit . SCALAR_UNIT_TYPES ) : #NEWLINE# #INDENT# value = scalarunit . get_scalarunit_value ( self . property_type , value ) #NEWLINE# #UNINDENT# if ( not self . _is_valid ( value ) ) : #NEWLINE# #INDENT# err_msg = self . _err_msg ( value ) #NEWLINE# ExceptionCollector . appendException ( ValidationError ( message = err_msg ) )