File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/Pecee/Http/Input/Attributes Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,13 @@ class ValidatorAttribute
20
20
* @param string|null $name
21
21
* @param string|null $type
22
22
* @param string|array $validator
23
+ * @param mixed|null $example
23
24
*/
24
25
public function __construct (
25
26
private ?string $ name = null ,
26
27
?string $ type = null ,
27
- string |array $ validator = array ()
28
+ string |array $ validator = array (),
29
+ private mixed $ example = null
28
30
){
29
31
if (is_string ($ validator ))
30
32
$ validator = explode ('| ' , $ validator );
@@ -115,4 +117,12 @@ public function getFullValidator(): array
115
117
return $ validator ;
116
118
}
117
119
120
+ /**
121
+ * @return mixed
122
+ */
123
+ public function getExample (): mixed
124
+ {
125
+ return $ this ->example ;
126
+ }
127
+
118
128
}
You can’t perform that action at this time.
0 commit comments