protected function getUniqueValidationRule($field) {
        $rule = 'unique:' . get_class($this) . ',' . $field . ',' . $this->getHeadId() . ',id';

        // ignore other versions of this entity
        if($this->getHeadId()) {
            $rule .= ',headVersion,!=,' . $this->getHeadId();
        }

        return $rule;
    }