Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c554e765c |
+2
-3
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user