Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在模型中打印这个语句时,
Yii::error($this->validate());
它给了我
false
问题:
如何检查违反了哪个验证?由于我有 38 个具有不同规则的参数,我厌倦了调试应用程序。有什么帮助吗?
您可以通过以下方式获取模型的错误:
$this->getErrors();
参考: