1 | <?php |
||
27 | class ValidatorAnnotation extends ManganPropertyAnnotation |
||
28 | { |
||
29 | |||
30 | const Ns = __NAMESPACE__; |
||
31 | |||
32 | /** |
||
33 | * @var string the user-defined error message. Different validators may define various |
||
34 | * placeholders in the message that are to be replaced with actual values. All validators |
||
35 | * recognize "{attribute}" placeholder, which will be replaced with the label of the attribute. |
||
36 | */ |
||
37 | public $message; |
||
38 | |||
39 | /** |
||
40 | * @var boolean whether this validation rule should be skipped when there is already a validation |
||
41 | * error for the current attribute. Defaults to false. |
||
42 | * @since 1.1.1 |
||
43 | */ |
||
44 | public $skipOnError = false; |
||
45 | |||
46 | /** |
||
47 | * @var array list of scenarios that the validator should be applied. |
||
48 | * Each array value refers to a scenario name with the same name as its array key. |
||
49 | */ |
||
50 | public $on; |
||
51 | |||
52 | /** |
||
53 | * @var boolean whether attributes listed with this validator should be considered safe for massive assignment. |
||
54 | * Defaults to true. |
||
55 | * @since 1.1.4 |
||
56 | */ |
||
57 | public $safe = true; |
||
58 | |||
59 | /** |
||
60 | * @var array list of scenarios that the validator should not be applied to. |
||
61 | * Each array value refers to a scenario name with the same name as its array key. |
||
62 | * @since 1.1.11 |
||
63 | */ |
||
64 | public $except; |
||
65 | |||
66 | /** |
||
67 | * Validator proxy class |
||
68 | * @var string |
||
69 | */ |
||
70 | public $proxy = ''; |
||
71 | public $class = ''; |
||
72 | public $value = ''; |
||
73 | |||
74 | 3 | public function init() |
|
102 | |||
103 | } |
||
104 |