Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Update Password does not work #390

Open
dharen008 opened this issue Aug 26, 2024 · 0 comments
Open

Extend Update Password does not work #390

dharen008 opened this issue Aug 26, 2024 · 0 comments

Comments

@dharen008
Copy link

Extend Update Password does not work

AdminPanelProvider.php
use App\Extended\Vendors\BreezyCore\ExtendedUpdatePassword;

BreezyCore::make()
	->myProfileComponents( [
		'update_password' => ExtendedUpdatePassword::class
	] )
	
ExtendedUpdatePassword.php
<?php

namespace App\Extended\Vendors\BreezyCore;

use Jeffgreco13\FilamentBreezy\Livewire\UpdatePassword;
use Illuminate\Validation\Rules\Password;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;

class ExtendedUpdatePassword extends UpdatePassword
{
	public function form(Form $form): Form
	{
		return parent::form( $form )
			->schema( [
				TextInput::make('current_password')
					->label(__('filament-breezy::default.password_confirm.current_password'))
					->revealable()
					->required()
					->password()
					->rule('current_password')
					->visible(filament('filament-breezy')->getPasswordUpdateRequiresCurrent()),
				TextInput::make('new_password')
					->label(__('filament-breezy::default.fields.new_password'))
					->revealable()
					->password()
					->rules( [ 
						Password::default()
							->uncompromised( 3 )
							->mixedCase()
							->numbers()
							->symbols()
					] )
					->required(),
				TextInput::make('new_password_confirmation')
					->label(__('filament-breezy::default.fields.new_password_confirmation'))
					->revealable()
					->password()
					->same('new_password')
					->required(),
			] );
	}
}

The file path and file name seem correct, but an error occurs after submission. Can someone else test it on their end?

image

Originally posted by @dharen008 in #362 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant