如何为数组[key] yii2 addError

public function beforeValidate() {

    if(isset($this->detailsData[5]) && !$this->detailsData[5]){
        $this->addError('detailsData[5]','error msg');
        return false;
    }

    return parent::beforeValidate();
}

我正在尝试在activeForm中的特定数组键上显示错误消息

style221 回答:如何为数组[key] yii2 addError

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3110155.html

大家都在问