| 1 | <?php |
||
| 13 | trait Validation |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @param array $required |
||
| 17 | */ |
||
| 18 | function validateRequired($required) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param $input |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | function requireErrorMessage($input) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Validate the given request with the given rules. |
||
| 40 | * |
||
| 41 | * @param object $request |
||
| 42 | * @param array $rules |
||
| 43 | * @param array $messages |
||
| 44 | * @param array $customAttributes |
||
| 45 | * @return array |
||
| 46 | * |
||
| 47 | * @throws \Illuminate\Validation\ValidationException |
||
| 48 | */ |
||
| 49 | public function validate($request, array $rules, |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Get a validation factory instance. |
||
| 59 | * |
||
| 60 | * @return \Illuminate\Contracts\Validation\Factory |
||
| 61 | */ |
||
| 62 | protected function getValidationFactory() |
||
| 66 | } |
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.