© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
Jacques

Unique validation

I have a model supporter. I need to when signing up check that a id_number does not exist on supporter and this is fine I get this but I also need to check if the id_number does not exist on members table, because a supporter could be upgraded to member we need to check if the member does not already exist.

so what i have is this

->unique(table: Supporter::class, ignoreRecord: true)
->unique(table: Member::class, ignoreRecord: true)

the supporter works fine but then the member is also looking for supporter id in members table which it does not have

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'supporters.id' in 'where clause'

select
count(*) as aggregate
from
members
members

where
id_number
id_number
= 1234
and
supporters
supporters
.
id
id
<> 2

how can i get this to work?
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

unique validation
FilamentFFilament / ❓┊help
3y ago
Unique validation for TextInputColumn
FilamentFFilament / ❓┊help
16mo ago
live unique email validation
FilamentFFilament / ❓┊help
3y ago
Unable to ignore unique validation
FilamentFFilament / ❓┊help
12mo ago