Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class ChangePasswordRequest extends FormRequest |
||
10 | { |
||
11 | /** |
||
12 | * Determine if the user is authorized to make this request. |
||
13 | * |
||
14 | * @return bool |
||
15 | */ |
||
16 | public function authorize() |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Get the validation rules that apply to the request. |
||
23 | * |
||
24 | * @return array |
||
25 | */ |
||
26 | public function rules() |
||
27 | { |
||
28 | return [ |
||
29 | 'old_password' => 'required', |
||
30 | 'new_password' => 'required|min:6|different:old_password', |
||
31 | 'confirm_password' => 'required|same:new_password|min:6', |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Configure the validator instance. |
||
37 | * |
||
38 | * @param \Illuminate\Validation\Validator $validator |
||
39 | * |
||
40 | * @return void |
||
41 | */ |
||
42 | public function withValidator($validator) |
||
48 | } |
||
49 | }); |
||
52 |