def validate_value(self, value):
if '<STR_LIT>' in self.metadata and self.metadata['<STR_LIT>']:<EOL><INDENT>raise PropertyError('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>validate(value, self.metadata)<EOL><DEDENT>except ValidationError:<EOL><INDENT>raise PropertyError('<STR_LIT>')<EOL><DEDENT>
Validate new property value before setting it.

value -- New value