{% load wagtailadmin_tags %}
<li class="{% if field.field.required %}required{% endif %} {{ wrapper_classes }} {{ li_classes }} {% if field.errors %}error{% endif %}">
    {% include "wagtailadmin/shared/field.html" %}
</li>