The interface Slick\Validator\ChainInterface has been deprecated with message: You should use the ValidationChainInterface instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be
removed from the class and what other constant to use instead.
Loading history...
22
{
23
24
/**
25
* @readwrite
26
* @var ValidatorInterface[]
27
*/
28
protected $_validators = [];
29
30
/**
31
* @readwrite
32
* @var array
33
*/
34
protected $_messages = [];
35
36
/**
37
* Returns true if and only if $value meets the validation requirements
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
47
if (!$validator->validates($value)) {
48
$valid = false;
49
$messages[] = $validator->getMessage();
50
}
51
}
52
$this->_messages = $messages;
53
return $valid;
54
}
55
56
/**
57
* Returns an array of messages that explain why the most recent
58
* isValid() call returned false. The array keys are validation failure
59
* message identifiers, and the array values are the corresponding
60
* human-readable message strings.
61
*
62
* @return array
63
*/
64
public function getMessages()
65
{
66
return $this->_messages;
67
}
68
69
/**
70
* Adds a validator to the chain
71
*
72
* @param ValidatorInterface $validator
73
*
74
* @return ValidatorChain
75
*/
76
public function add(ValidatorInterface $validator)
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.