#NEWLINE# def validate( self , value ) : #NEWLINE# #INDENT# 'Validates the data given in value.\n\n        @param value:\n                   the value to validate.\n        @raise InvalidValueException:\n                    if the value was invalid.\n        ' #NEWLINE# if ( ( self . _onlyNullAllowed and ( value is not None ) ) or ( ( not self . _onlyNullAllowed ) and ( value is None ) ) ) : #NEWLINE# #INDENT# raise InvalidValueException ( self . _errorMessage )