This commit is contained in:
2021-12-07 16:43:19 +08:00
parent 76bd050ada
commit a7531432d4
+1 -1
View File
@@ -30,7 +30,7 @@ class UniqueValidator extends BaseValidator
} }
$model = $this->model; $model = $this->model;
if (!$this->model->getIsCreate()) { if (!$this->model->getIsNowExample()) {
return true; return true;
} }
if ($model::query()->where([$this->field => $param[$this->field]])->exists()) { if ($model::query()->where([$this->field => $param[$this->field]])->exists()) {