@@ 51-58 (lines=8) @@ | ||
48 | * @param array $customAttributes |
|
49 | * @return void |
|
50 | */ |
|
51 | public function validate(Request $request, array $rules, array $messages = [], array $customAttributes = []) |
|
52 | { |
|
53 | $validator = $this->getValidationFactory()->make($request->all(), $rules, $messages, $customAttributes); |
|
54 | ||
55 | if ($validator->fails()) { |
|
56 | $this->throwValidationException($request, $validator); |
|
57 | } |
|
58 | } |
|
59 | ||
60 | /** |
|
61 | * Validate the given data with the given rules. |
|
@@ 69-76 (lines=8) @@ | ||
66 | * @param array $messages |
|
67 | * @param array $customAttributes |
|
68 | */ |
|
69 | public function validateData(Request $request, array $data, array $rules, array $messages = [], array $customAttributes = []) |
|
70 | { |
|
71 | $validator = $this->getValidationFactory()->make($data, $rules, $messages, $customAttributes); |
|
72 | ||
73 | if ($validator->fails()) { |
|
74 | $this->throwValidationException($request, $validator); |
|
75 | } |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * Validate the given request with the given rules. |