DEV Community

JohnDivam
JohnDivam

Posted on

Filament: add a confirmation password field in a form

To add a confirmation password field in a form, you typically want to ensure that the user correctly enters their password twice to prevent typos and ensure accuracy .

Forms\Components\TextInput::make('password')
                    ->password()
                    ->required()
                    ->maxLength(255),
 Forms\Components\TextInput::make('password_confirmation')
                    ->password()
                    ->required()
                    ->maxLength(255)
                    ->same('password')
                    ->label('Confirm Password'),
Enter fullscreen mode Exit fullscreen mode

Top comments (0)