title: Defining custom twig form block for errors rendering
body: <p>I'm trying to define a specific new block for form field errors rendering, keeping form_errors unchanged for common errors rendering.</p>
  
  <pre class="lang-yaml prettyprint-override"><code># Twig Configuration
  twig:
    debug:            %kernel.debug%
    strict_variables: %kernel.debug%
      form:
        resources:
          - 'ApplicationMyBundle:Main:form/customFormTheme.html.twig'
  </code></pre>
  
  <p>In <code>customFormTheme.html.twig</code> I overwrite a few blocks copied from <code>form_div_layout.html.twig</code> plus I added the folloowing new one.</p>
  
  <pre class="lang-html prettyprint-override"><code>{% block field_errors %}{% spaceless %}
          {% if errors|length &gt; 0 %}
          &lt;ul class="errors"&gt;
              {% for error in errors %}
                  {% if error.messageTemplate|length %}
                  &lt;li class="error"&gt;{{ error.messageTemplate|trans(error.messageParameters, 'validators') }}&lt;/li&gt;
                  {% endif %}
              {% endfor %}
          &lt;/ul&gt;
          {% endif %}
  {% endspaceless %}{% endblock %}
  </code></pre>
  
  <p>Then I expect to be able to use this block in my views like this :</p>
  
  <pre class="lang-twig prettyprint-override"><code> &lt;div&gt;
       {{ form_label(form.message, 'message.label'|trans({},'contact')|raw ) }}
       {{ form_widget(form.message, {attr: {maxlength:1000, size:1000, rows:8}}) }}
       {{ field_errors(form.message) }}
   &lt;/div&gt;
  </code></pre>
  
  <p>but I receive the following error :</p>
  
  <p><code>The function "field_errors" does not exist. Did you mean "form_errors"</code></p>
  
  <p>I also tried by naming my block <code>text_errors</code> or <code>textarea_errors</code> mentioned <strong><a href="http://symfony.com/doc/current/book/forms.html#template-fragment-inheritance" rel="nofollow">here</a></strong> but I haven't been luckier.</p>
  
  <p>Any idea ?</p>