Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 011e0cd9b8 | |||
| a7531432d4 |
@@ -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()) {
|
||||||
|
|||||||
@@ -196,7 +196,6 @@ class Validator extends BaseValidator
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->validators = null;
|
|
||||||
$this->validators = [];
|
$this->validators = [];
|
||||||
return !isset($isTrue);
|
return !isset($isTrue);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user