| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function rules(): array |
||
| 19 | { |
||
| 20 | return [ |
||
| 21 | /** |
||
| 22 | * You must allow default pin for RULE `CurrentPin` |
||
| 23 | * so that the pin can be changed from the default value. |
||
| 24 | * In order to do that we set it to receive a boolean |
||
| 25 | * value TRUE as a first parameter |
||
| 26 | */ |
||
| 27 | 'current_pin' => ['required', 'string', new CurrentPin(true)], |
||
| 28 | 'pin' => [ |
||
| 29 | 'required', 'string', |
||
| 30 | 'max:' . config('requirepin.max', 4), |
||
| 31 | Password::min(config('requirepin.min', 4))->numbers(), |
||
| 32 | 'confirmed', |
||
| 33 | new DisallowOldPin( |
||
| 34 | config('requirepin.check_all', true), |
||
| 35 | config('requirepin.number', 4) |
||
| 36 | ) |
||
| 41 |