This commit is contained in:
2024-01-10 17:35:55 +08:00
parent 21aca8b642
commit ac52f9f967
+2 -3
View File
@@ -94,15 +94,14 @@ class Validator extends BaseValidator
/**
* @param ModelInterface $model
* @param array $attributes
* @return bool
*/
public function validation(ModelInterface $model): bool
public function validation(array $attributes): bool
{
if (count($this->validators) < 1) {
return true;
}
$attributes = $model->getChanges();
foreach ($attributes as $field => $attribute) {
if (isset($this->validators[$field])) {
$validator = $this->validators[$field];