not used to plugin testing - trying to get working but fixtures not working yet

This commit is contained in:
2025-03-26 00:07:05 -07:00
parent 23147fc574
commit b17634c08a
21 changed files with 628 additions and 58 deletions

View File

@@ -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;
}