class ProfilePassword extends Page implements HasForms
{
use InteractsWithForms;
public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make("current_password")
->required()
->password(),
Forms\Components\TextInput::make("new_password")
->password()
->minLength(5)
->rule(Password::default()->min(8))
->required(),
Forms\Components\TextInput::make("new_password_confirmation")
->password()
->same("new_password")
->required(),
]);
}
}
class ProfilePassword extends Page implements HasForms
{
use InteractsWithForms;
public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make("current_password")
->required()
->password(),
Forms\Components\TextInput::make("new_password")
->password()
->minLength(5)
->rule(Password::default()->min(8))
->required(),
Forms\Components\TextInput::make("new_password_confirmation")
->password()
->same("new_password")
->required(),
]);
}
}