{% macro with_errors(field) %} {% if field.errors %} {% set css_class = 'has-error ' + kwargs.pop('class', '') %}