Browse Source

[TwigBundle] Fixed variable reference in the errors block of the form.twig template

Bernhard Schussek 14 years ago
parent
commit
6176063b30
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Symfony/Bundle/TwigBundle/Resources/views/form.twig

+ 2 - 2
src/Symfony/Bundle/TwigBundle/Resources/views/form.twig

@@ -13,9 +13,9 @@
 {% endblock field_group %}
 {% endblock field_group %}
 
 
 {% block errors %}
 {% block errors %}
-    {% if errors %}
+    {% if field.hasErrors %}
     <ul>
     <ul>
-        {% for error in errors %}
+        {% for error in field.errors %}
             <li>{% trans error.0 with error.1 from validators %}</li>
             <li>{% trans error.0 with error.1 from validators %}</li>
         {% endfor %}
         {% endfor %}
     </ul>
     </ul>