I have a model with two columns 'name' and 'size'. I am trying to validate the uniqueness of size only if name and size together doesn't exist in database.
For example.
Name = Shirt and Size = L are in database then Name = Shirt and Size = L shouldn't pass the unique validation rather Name = Pant and Size = L should pass the uniqueness.