1 | <?php |
||
18 | class CountValidator extends SizeValidator implements ValidatorInterface |
||
19 | { |
||
20 | |||
21 | use OnScenario, |
||
22 | Safe; |
||
23 | |||
24 | /** |
||
25 | * @Label('There are not enough of {attribute} (minimum is {min})') |
||
26 | * @var string |
||
27 | */ |
||
28 | public $msgTooShort = ''; |
||
29 | |||
30 | /** |
||
31 | * @Label('There are too many of {attribute} (maximum is {max})') |
||
32 | * @var string |
||
33 | */ |
||
34 | public $msgTooLong = ''; |
||
35 | |||
36 | /** |
||
37 | * @Label('There must be exact {length} number of {attribute}') |
||
38 | * @var string |
||
39 | */ |
||
40 | public $msgLength = ''; |
||
41 | |||
42 | public function isValid(AnnotatedInterface $model, $attribute) |
||
56 | |||
57 | } |
||
58 |