27 lines
688 B
PHP
27 lines
688 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Private\Profile;
|
|
|
|
use App\Contracts\FormRequestDto;
|
|
use App\Dto\Request\Private\Profile\UpdatePassword;
|
|
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'));
|
|
}
|
|
}
|