I have a table of product sizes
Product Details
id product_id size
1 1 m
1 1 l
2 2 l
If i try to add another detail to product 1 with size m it should return false but for product 2 size m should go through
In my Product Detail Table here is validator its something here
//Product Detail Table
public function validationDefault(Validator $validator){
$validator
->add('size', 'unique', ['rule' => 'validateUnique', 'provider' => 'table'])
Not sure how to add a condition for column