On Twitter Bootstrap, input elements are enclosed between a "control-group" div or fieldset . So I would do something like this in the template
{%for field in form %} <div class="control-group {%if field.errors %}error{%endif%}"> {# render your field #} </div> {% endfor %}
Note. In bootstrap, class="alert alert-error" appears for warning messages, not specific errors.
source share