PasswordResetPostProcessRequest::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Auth\Http\Requests\Tenantarea;
6
7
class PasswordResetPostProcessRequest extends PasswordResetRequest
8
{
9
    /**
10
     * Get the validation rules that apply to the request.
11
     *
12
     * @return array
13
     */
14
    public function rules(): array
15
    {
16
        return [
17
            //'token' => 'required|regex:/^([0-9a-f]*)$/',
18
            //'expiration' => 'required|date_format:U',
19
            // Do not validate `token` or `expiration` here since at this stage we can NOT generate viewable
20
            // error, and it is been processed in the controller through EmailVerificationBroker anyway
21
            'email' => 'required|email|min:3|max:150|exists:'.config('cortex.auth.tables.members').',email',
22
            'password' => 'required|confirmed|min:'.config('cortex.auth.password_min_chars'),
23
        ];
24
    }
25
}
26