Checking for conflict in day, time and room validation.
Hi Tuto, May I ask your expertise on how can I implement a validation rule on checking the conflict of the day, time and room in a class schedule? I am using Laravel 10 and Filament 3.0. I have a belongsToMany relationship between the subjects and a schedule. I don't how or where to start. Appreciate your help. Thank you!
2 Replies
I would use a custom validation rule on the room field. You have access to $get so you can check the combination of the day, time and room fields in the database to make sure there are no conflicts.
https://filamentphp.com/docs/3.x/forms/validation#custom-rules
Thank you! I will try this..