public function valid(EntityContract $entity, $value)
    {
        if (!parent::valid($entity, $value)) {
            return false;
        }

        return ($this->getTaxonomyName() !== null && $value->parent_id === $this->getTaxonomy($entity)->id) || $this->getTaxonomyName() === null;
    }