{% for group, options, index in field|optgroups %}
{% comment %}NOTE: Checkbox/Radio group is not supported{% endcomment %}
{% comment %}{% if group %}{{ group }}{% endif %}{% endcomment %}
{% for option in options %}
{% if field.errors and forloop.last and not inline_class and forloop.parentloop.last %}
{% include 'bootstrap5/layout/field_errors_block.html' %}
{% endif %}
{% endfor %}
{% endfor %}
{% if field.errors and inline_class %}
{% for error in field.errors %}
{{ error }}
{% endfor %}
{% endif %}
{% include 'bootstrap5/layout/help_text.html' %}