1 | <?php |
||
14 | trait Validation |
||
15 | { |
||
16 | /** |
||
17 | * @param array $required |
||
18 | */ |
||
19 | function validateRequired($required) |
||
29 | |||
30 | /** |
||
31 | * @param $input |
||
32 | * @return string |
||
33 | */ |
||
34 | function requireErrorMessage($input) |
||
38 | |||
39 | /** |
||
40 | * Validate the given request with the given rules. |
||
41 | * |
||
42 | * @param object $request |
||
43 | * @param array $rules |
||
44 | * @param array $messages |
||
45 | * @param array $customAttributes |
||
46 | * @return array |
||
47 | * |
||
48 | * @throws \Illuminate\Validation\ValidationException |
||
49 | */ |
||
50 | public function validate($request, array $rules, |
||
60 | |||
61 | /** |
||
62 | * Get a validation factory instance. |
||
63 | * |
||
64 | * @return \Illuminate\Contracts\Validation\Factory |
||
65 | */ |
||
66 | protected function getValidationFactory() |
||
70 | } |
||
71 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.