def METHOD_NAME(self, instance):
    if not self.is_active(instance.data):
        return
    if not self.validate_mesh and not self.validate_collision:
        self.log.debug("Validation of both mesh and collision names"
                       "is disabled.")
        return
    if not instance.data.get("collisionMembers", None):
        self.log.debug("There are no collision objects to validate")
        return
    invalid = self.get_invalid(instance)
    if invalid:
        raise PublishValidationError("Model naming is invalid. See log.")