userrights newsletter
This commit is contained in:
1 parent
2514349783
commit
7e8fa02ded
6 files changed
+207
-209
No files matched your search
@@ -8,6 +8,7 @@ use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Validation\Rules\Password;
|
||||
|
||||
class UserForm
|
||||
@@ -39,20 +40,26 @@ class UserForm
|
||||
->prefixIcon('phosphor-envelope')
|
||||
->label('E-Mail'),
|
||||
TextInput::make('password')
|
||||
->prefixIcon('phosphor-lock')
|
||||
->label('Passwort')
|
||||
->password() // Masks the input
|
||||
->required()
|
||||
->password()
|
||||
->revealable()
|
||||
->rule(Password::min(8)->mixedCase()->numbers()->symbols()->uncompromised()) // Enforces strong password policies
|
||||
->dehydrateStateUsing(fn ($state) => bcrypt($state)) // Hashes the password before saving
|
||||
->prefixIcon('phosphor-lock')
|
||||
->dehydrated(fn ($state): bool => filled($state))
|
||||
->dehydrateStateUsing(fn ($state): string => Hash::make($state))
|
||||
->same('password_confirmation')
|
||||
->rule(Password::min(8)
|
||||
->mixedCase()
|
||||
->numbers()
|
||||
->symbols()
|
||||
->uncompromised())
|
||||
->label('Password'),
|
||||
TextInput::make('password_confirmation')
|
||||
->label('Passwort Bestätigen')
|
||||
->prefixIcon('phosphor-lock')
|
||||
->password() // Masks the input
|
||||
->required()
|
||||
->same('password') // Validates that this matches the 'password' field
|
||||
->label('Passwort Bestätigen'),
|
||||
->password()
|
||||
->dehydrated(false)
|
||||
->same('password')
|
||||
->revealable(),
|
||||
Checkbox::make('agb_akzeptiert')
|
||||
->default(false)
|
||||
->label('Allgemeinen Geschäftsbedinnungen akzeptieren')
|
||||
|
||||
Reference in new issue
Block a user