1 | <?php |
||
7 | class TwitterHandleRule implements Rule |
||
8 | { |
||
9 | /** |
||
10 | * @var TwitterHandleValidator |
||
11 | */ |
||
12 | protected $twitterHandleValidator; |
||
13 | |||
14 | /** |
||
15 | * @param TwitterHandleValidator $twitterHandleValidator |
||
16 | */ |
||
17 | public function __construct(TwitterHandleValidator $twitterHandleValidator) |
||
21 | |||
22 | /** |
||
23 | * Determine if the validation rule passes. |
||
24 | * |
||
25 | * @param string $attribute |
||
26 | * @param mixed $value |
||
27 | * @return bool |
||
28 | */ |
||
29 | public function passes($attribute, $value) |
||
33 | |||
34 | /** |
||
35 | * Get the validation error message. |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | public function message() |
||
43 | } |
||
44 |