Symfony2: How to Check If a Form Field Has Errors in Twig

1 Comment

Sometimes you need to check if a field or even the entire form has errors before rendering them (e.g. when adding an errors container). Here’s the code snippet that allows you to check for the errors form variable: