© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago
Azura

notIn validation custom error

Hi,

Is it possible to create custom error messages for the following two 'notIn' validators without making changing them to rules?
(Check picture)

public function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\TextInput::make('email')
                    ->required()
                    ->maxLength(255)
                    ->email()
                    ->notIn(fn (): array => $this->ownerRecord->users()->pluck('email')->toArray())
                    ->notIn(fn (): array => $this->ownerRecord->teamInvitations()->pluck('email')->toArray())
            ]);
    }
public function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\TextInput::make('email')
                    ->required()
                    ->maxLength(255)
                    ->email()
                    ->notIn(fn (): array => $this->ownerRecord->users()->pluck('email')->toArray())
                    ->notIn(fn (): array => $this->ownerRecord->teamInvitations()->pluck('email')->toArray())
            ]);
    }
image.png
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

TextInputColumn custom validation error
FilamentFFilament / ❓┊help
13mo ago
Custom Validation
FilamentFFilament / ❓┊help
3y ago
Custom validation rules
FilamentFFilament / ❓┊help
3y ago
Custom repeater validation
FilamentFFilament / ❓┊help
3y ago