2023-07-07 18:08:14 +06:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Private\Profile;
|
|
|
|
|
|
|
|
use App\Contracts\FormRequestDto;
|
2023-08-01 22:04:35 +06:00
|
|
|
use App\Dto\Request\Private\User\UpdatePassword;
|
2023-07-07 18:08:14 +06:00
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
use Illuminate\Validation\Rules\Password;
|
|
|
|
|
|
|
|
final class UpdatePasswordRequest extends FormRequest implements FormRequestDto
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
*/
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'password' => ['required', 'confirmed', Password::default()],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDto(): UpdatePassword
|
|
|
|
{
|
|
|
|
return new UpdatePassword(password: $this->input('password'));
|
|
|
|
}
|
|
|
|
}
|