1 | <?php |
||
28 | class StringValidator extends SizeValidator implements ValidatorInterface |
||
29 | { |
||
30 | |||
31 | use OnScenario, |
||
32 | Safe; |
||
33 | |||
34 | /** |
||
35 | * @Label('{attribute} is too short (minimum is {min} characters)') |
||
36 | * @var string |
||
37 | */ |
||
38 | public $msgTooShort = ''; |
||
39 | |||
40 | /** |
||
41 | * @Label('{attribute} is too long (maximum is {max} characters)') |
||
42 | * @var string |
||
43 | */ |
||
44 | public $msgTooLong = ''; |
||
45 | |||
46 | /** |
||
47 | * @Label('{attribute} is of the wrong length (should be {length} characters)') |
||
48 | * @var string |
||
49 | */ |
||
50 | public $msgLength = ''; |
||
51 | |||
52 | 6 | public function isValid(AnnotatedInterface $model, $attribute) |
|
64 | |||
65 | } |
||
66 |