Hi, I need help regarding validation. I want to validate multiple columns
Suppose I am having 2 columns and one foreign ID in a table. The record should be unique.
E.g.
Record one
Product name = abc
product area = def
user_id = 1
record two
Product name = abc
product area = def
user_id = 2
these both are unique
I want to add this validation in filament product resource page
1 Reply
You can use a unique rule with the where clause: https://laravel.com/docs/10.x/validation#rule-unique
something like this:
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.