You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
715 B
26 lines
715 B
<?php
|
|
|
|
namespace App\Livewire\Forms\Account;
|
|
|
|
use Livewire\Attributes\Validate;
|
|
use Livewire\Form;
|
|
|
|
class UpdatePasswordForm extends Form
|
|
{
|
|
#[Validate(as: 'domains/identity/field.user.current_password')]
|
|
public string $current_password = '';
|
|
|
|
#[Validate(as: 'domains/identity/field.user.new_password')]
|
|
public string $new_password = '';
|
|
|
|
#[Validate(as: 'domains/identity/field.user.confirm_password')]
|
|
public string $new_password_confirmation = '';
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'current_password' => ['required', 'current_password'],
|
|
'new_password' => ['required', 'min:8', 'confirmed', 'different:current_password'],
|
|
];
|
|
}
|
|
}
|
|
|