To display form errors in a branch template, you just need to use the form_errorstwig macro no matter if it is a global form error or a field error.
But in my case, the global error does not appear as a field error, so I cannot use the twig macro form_errorsfor these two cases. I decided to use a macro for a field error, and I would like to get global form errors from an object Symfony\Component\Form\FormView. The goal is to iterate over global errors in the branch template and display them the way I want.
In fact, I cannot find any resources in the symfony2 documentation that can help me.
source
share