IsUniqueValue and AreUniqueValues validations

I have a list of Customers who each have multiple Depots.

I use a form with a Database join and repeat groups to allow multiple depots for each customer.

I want to allow only unique depot names for each customer, but differing Customers could have matching Depot names.

I assumed I could use the areUniqueValues validation plugin, but it doesn't have the option 'within group' like isUniqueValue has. This means its possible to enter duplicate values on different repeat groups.

Should I write some JS onchange for the Depot field or are there any better solutions?
 
You can always add a php validation to do more complex validations.
Make sure to exclude the rowid of the record you are on in your selects.
 
Back
Top