fix:修复编辑时 unique 验证问题 (#31)

This commit is contained in:
windy 2024-01-03 18:24:25 +08:00 committed by GitHub
parent 746a465fe7
commit 71d71a58b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}