Answer the question
In order to leave comments, you need to log in
How to validate a pair of values from several tables for uniqueness?
Hello.
For example, there is a users table and a groups table .
users : id, name, email.
groups : id, name, slug.
How to set up validation to check and prevent user registration with the same email , within a group (name from groups).
That is, users can register with the same email multiple times, but the users.email and groups.name pair must be unique.
Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question