TRF Certest first commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Vanguard\Http\Requests\Auth;
|
||||
|
||||
use Vanguard\Http\Requests\Request;
|
||||
|
||||
class PasswordResetRequest extends Request
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'token' => 'required',
|
||||
'email' => 'required|email',
|
||||
'password' => [
|
||||
'required',
|
||||
'confirmed',
|
||||
'min:8',
|
||||
'regex:/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'password.regex' => __('The password must be at least 8 characters long and contain at least one number and one special character (@$!%*?&).'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the password reset fields.
|
||||
*/
|
||||
public function credentials(): array
|
||||
{
|
||||
return $this->only('email', 'password', 'password_confirmation', 'token');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user