27 lines
670 B
PHP
27 lines
670 B
PHP
|
<?php declare(strict_types=1);
|
||
|
|
||
|
namespace App\Http\Requests\Private\Users;
|
||
|
|
||
|
use App\Contracts\FormRequestDto;
|
||
|
use App\Dto\Request\Private\User\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', Password::default()],
|
||
|
];
|
||
|
}
|
||
|
|
||
|
public function getDto(): UpdatePassword
|
||
|
{
|
||
|
return new UpdatePassword(password: $this->input('password'));
|
||
|
}
|
||
|
}
|