From 76b1d9836b87b99bae4e53b929faa108af9421c7 Mon Sep 17 00:00:00 2001 From: Janne de Vos Date: Thu, 24 Oct 2024 12:31:28 +0200 Subject: [PATCH] Adding dehydrated state to Password.php --- src/Resources/UserResource/Form/Components/Password.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Resources/UserResource/Form/Components/Password.php b/src/Resources/UserResource/Form/Components/Password.php index e437ed9..d93ea0f 100644 --- a/src/Resources/UserResource/Form/Components/Password.php +++ b/src/Resources/UserResource/Form/Components/Password.php @@ -19,6 +19,7 @@ public static function make(): Forms\Components\TextInput ->revealable(filament()->arePasswordsRevealable()) ->required(fn ($record) => ! $record) ->rule(\Illuminate\Validation\Rules\Password::default()) + ->dehydrated(fn ($state) => filled($state)) ->dehydrateStateUsing(fn ($state) => Hash::make($state)) ->same('passwordConfirmation') ->validationAttribute(__('filament-panels::pages/auth/register.form.password.validation_attribute'));