I have an order and product object
class Order {
protected $products;
}
and
class Product
{
protected $order;
protected $category;
protected $size;
public function isSizeValid()
{
if($this->category->getCode() == 1 && is_null($this->size)) {
return false;
}
return true;
}
}
in my orderType form, I added the ProductTypes set, with error_bubbling set to false. But when my isSizeValid is false, I have no error message in my form.
But when I set error_bubbling to true, the error displays on top of my form.
How can I display an error next to each product in a branch template?
source
share