mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
自动注册模型类定义的rule规则
This commit is contained in:
@@ -991,6 +991,9 @@ class Model
|
||||
// 验证前清空error
|
||||
$this->error = '';
|
||||
if (!empty($this->options['validate'])) {
|
||||
if (!empty($this->rule)) {
|
||||
Validate::rule($this->rule);
|
||||
}
|
||||
if (!Validate::check($data, $this->options['validate'])) {
|
||||
$this->error = Validate::getError();
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user