1 Commits

Author SHA1 Message Date
as2252258 2c554e765c eee 2024-01-10 17:35:55 +08:00
+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];