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
2020 * @param string|null $name
2121 * @param string|null $type
2222 * @param string|array $validator
23+ * @param mixed|null $example
2324 */
2425 public function __construct (
2526 private ?string $ name = null ,
2627 ?string $ type = null ,
27- string |array $ validator = array ()
28+ string |array $ validator = array (),
29+ private mixed $ example = null
2830 ){
2931 if (is_string ($ validator ))
3032 $ validator = explode ('| ' , $ validator );
@@ -115,4 +117,12 @@ public function getFullValidator(): array
115117 return $ validator ;
116118 }
117119
120+ /**
121+ * @return mixed
122+ */
123+ public function getExample (): mixed
124+ {
125+ return $ this ->example ;
126+ }
127+
118128}
You can’t perform that action at this time.
0 commit comments