def METHOD_NAME(self, field):
    query = (Survey.query.with_parent(self.event)
             .filter(db.func.lower(Survey.title) == field.data.lower(),
                     Survey.title != field.object_data,
                     ~Survey.is_deleted))
    if query.count():
        raise ValidationError(_('There is already a survey named "{}" on this event').format(escape(field.data)))