not used to plugin testing - trying to get working but fixtures not working yet
This commit is contained in:
@@ -97,8 +97,8 @@ class ProductsTable extends Table
|
||||
*/
|
||||
public function buildRules(RulesChecker $rules): RulesChecker
|
||||
{
|
||||
$rules->add($rules->isUnique(['product_category_id', 'name']), ['errorField' => '0']);
|
||||
$rules->add($rules->existsIn(['product_category_id'], 'ProductCategories'), ['errorField' => '1']);
|
||||
$rules->add($rules->isUnique(['product_category_id', 'name']), ['errorField' => 'product_category_id']);
|
||||
$rules->add($rules->existsIn(['product_category_id'], 'ProductCategories'), ['errorField' => 'product_category_id']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user