mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 14:41:29 +00:00
fix:修复编辑时 unique 验证问题 (#31)
This commit is contained in:
parent
746a465fe7
commit
71d71a58b4
@ -134,6 +134,8 @@ trait Backend
|
||||
if (class_exists($validate)) {
|
||||
$validate = new $validate;
|
||||
if ($this->modelSceneValidate) $validate->scene('edit');
|
||||
$pk = $this->model->getPk();
|
||||
$data[$pk] = $row[$pk];
|
||||
$validate->check($data);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user