瀏覽代碼

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

Bernhard Schussek 14 年之前
父節點
當前提交
6176063b30
共有 1 個文件被更改,包括 2 次插入2 次删除
  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 %}
 
 {% 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>