Conditions | 1 |
Paths | 1 |
Total Lines | 42 |
Code Lines | 27 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Anomaly\UsersModule\User\Password; |
||
18 | public function handle(ChangePasswordFormBuilder $builder) |
||
19 | { |
||
20 | $builder->setFields( |
||
21 | [ |
||
22 | 'password_old' => [ |
||
23 | 'type' => 'anomaly.field_type.text', |
||
24 | 'label' => 'anomaly.module.users::field.password_old.name', |
||
25 | 'config' => [ |
||
26 | 'type' => 'password', |
||
27 | ], |
||
28 | 'required' => true, |
||
29 | 'rules' => [ |
||
30 | 'required|valid_password_old', |
||
31 | ], |
||
32 | 'validators' => [ |
||
33 | 'valid_password_old' => [ |
||
34 | 'handler' => 'Anomaly\UsersModule\User\Validation\ValidateCurrentPassword@handle', |
||
35 | 'message' => 'anomaly.module.users::message.invalid_password_old', |
||
36 | ], |
||
37 | ], |
||
38 | ], |
||
39 | 'password_new' => [ |
||
40 | 'type' => 'anomaly.field_type.text', |
||
41 | 'label' => 'anomaly.module.users::field.password_new.name', |
||
42 | 'config' => [ |
||
43 | 'type' => 'password', |
||
44 | ], |
||
45 | 'required' => true, |
||
46 | 'rules' => [ |
||
47 | 'confirmed', |
||
48 | ], |
||
49 | ], |
||
50 | 'password_new_confirmation' => [ |
||
51 | 'type' => 'anomaly.field_type.text', |
||
52 | 'label' => 'anomaly.module.users::field.password_new.name', |
||
53 | 'config' => [ |
||
54 | 'type' => 'password', |
||
55 | ], |
||
56 | ], |
||
57 | ] |
||
58 | ); |
||
59 | } |
||
60 | } |
||
61 |