public function setRequired(bool $required): BaseAttribute
    {
        parent::setRequired($required);

        if ($this->getMinLength() === 0) {
            $this->setMinLength(1);
        }

        return $this;
    }