© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•15mo ago•
7 replies
hrvzmndz

unique rules depending on other field

i have field volume_name and book_name in sections table

i want a rule that make unique book_name depends on volume name

volume_name book_name
volume 1 book 1
volume 1 book 2

so when i encode volume 1 book 1 it will have validated error. Here's my code
image.png
Solution
Live the fields live, then put a closure into the rules. like

https://filamentphp.com/docs/3.x/forms/validation#custom-rules
Validation - Form Builder - Filament
Jump to solution
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

Field plugin depending on other field
FilamentFFilament / ❓┊help
3y ago
filament unique rules
FilamentFFilament / ❓┊help
2y ago
Unique field on a form
FilamentFFilament / ❓┊help
3y ago