set error message to form in addArticle action

This commit is contained in:
Manuel Raynaud
2013-08-06 16:37:08 +02:00
parent b0c3112d71
commit f727fe4203

View File

@@ -113,6 +113,11 @@ class Cart implements EventSubscriberInterface
$message = "Missing or invalid data";
}
$cartAdd->setError(true);
$cartAdd->setErrorMessage($message);
$event->setErrorForm($cartAdd);
}
private function getAddCartForm(Request $request)