eee
This commit is contained in:
+2
-3
@@ -94,15 +94,14 @@ class Validator extends BaseValidator
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ModelInterface $model
|
* @param array $attributes
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validation(ModelInterface $model): bool
|
public function validation(array $attributes): bool
|
||||||
{
|
{
|
||||||
if (count($this->validators) < 1) {
|
if (count($this->validators) < 1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$attributes = $model->getChanges();
|
|
||||||
foreach ($attributes as $field => $attribute) {
|
foreach ($attributes as $field => $attribute) {
|
||||||
if (isset($this->validators[$field])) {
|
if (isset($this->validators[$field])) {
|
||||||
$validator = $this->validators[$field];
|
$validator = $this->validators[$field];
|
||||||
|
|||||||
Reference in New Issue
Block a user