Pārlūkot izejas kodu

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

Bernhard Schussek 14 gadi atpakaļ
vecāks
revīzija
6176063b30

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

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