© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Marc

Validation does not work

I have created a custom page, but the validation did not work, in "new_password" I put 123 and in "new_password_confirmation" 1234 and I do not get any validation errors, nor are the rules of "->rule()" being applied, this is the page code:

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(),
            ]);
    }
}


In blade file:
<x-filament-panels::page>
    <x-filament-panels::form wire:submit="save"> 
        {{ $this->form }}
 
        <x-filament-panels::form.actions 
            :actions="$this->getFormActions()"
        /> 
    </x-filament-panels::form>
</x-filament-panels::page>
<x-filament-panels::page>
    <x-filament-panels::form wire:submit="save"> 
        {{ $this->form }}
 
        <x-filament-panels::form.actions 
            :actions="$this->getFormActions()"
        /> 
    </x-filament-panels::form>
</x-filament-panels::page>
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Validation didn't work
FilamentFFilament / ❓┊help
3y ago
Database Notification does not work
FilamentFFilament / ❓┊help
12mo ago
MorphOne mutateRelationshipDataBeforeCreateUsing does not work properly
FilamentFFilament / ❓┊help
2y ago
Filter does not work automatically
FilamentFFilament / ❓┊help
2y ago