Custom validation message?

Hi, how to change some validation message for specific form? Invitation action form:
TextInput::make('email')
->unique(
table: 'team_invitations',
callback: fn (Unique $rule) =>
$rule->where('team_id', getPermissionsTeamId())
TextInput::make('email')
->unique(
table: 'team_invitations',
callback: fn (Unique $rule) =>
$rule->where('team_id', getPermissionsTeamId())
I just want to make a very little change: "The Email has already been taken invited this team" so I think I shouldn't modify the lang file.
4 Replies
Kenneth Sese
Kenneth Sese2y ago
Filament
Validation - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
IndomieRendang
IndomieRendangOP2y ago
Thanks. I've read that before, but not sure how to implement Illuminate\Validation\Rules\Unique into that closure 🤔
Dan Harrin
Dan Harrin2y ago
check out the livewire docs for customizing validation messages you need a $messages array on the page
IndomieRendang
IndomieRendangOP2y ago
Thanks... This will be useful for me...
Want results from more Discord servers?
Add your server