def validate_value(self, value):
if value not in (None, self._unset):<EOL><INDENT>super(ReferenceField, self).validate_value(value)<EOL>if value.app != self.target_app:<EOL><INDENT>raise ValidationError(<EOL>self.record,<EOL>"<STR_LIT>".format(<EOL>self.name,<EOL>self.target_app,<EOL>value,<EOL>value.app<EOL>)<EOL>)<EOL><DEDENT><DEDENT>
Validate provided record is a part of the appropriate target app for the field