ldc-gen-game-web/app/Http/Requests/Fo/UpdatePasswordRequest.php

41 lines
889 B
PHP
Raw Permalink Normal View History

2022-01-10 16:58:25 +01:00
<?php
2022-03-15 16:27:41 +01:00
namespace App\Http\Requests\Fo;
2022-01-10 16:58:25 +01:00
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rules\Password;
2022-01-10 16:58:25 +01:00
2022-03-15 16:27:41 +01:00
class UpdatePasswordRequest extends FormRequest
2022-01-10 16:58:25 +01:00
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize()
{
// * Autorisation vérifiée dans le controlleur.
2022-03-15 16:27:41 +01:00
return true;
2022-01-10 16:58:25 +01:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'password' => [
'required', 'confirmed', 'min:8', 'max:255',
Password::min(8)
->mixedCase()
->letters()
->numbers()
->symbols()
->uncompromised()
]
2022-01-10 16:58:25 +01:00
];
}
}