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

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

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

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

        return $this;
    }
public function setRequired ( bool $ required ) : BaseAttribute { parent :: setRequired ( $ required ) ; if ( $ this -> getMinLength ( ) === 0 ) { $ this -> setMinLength ( 1 ) ; } return $ this ; }
Set Required.

@param bool $required

@return $this
Set Required .