Is there anyway to remove the ul element from the django forms.errors?

I was wondering if there is anyway to remove the ul element form the django form.errors.

Image what the page looks like

This is what it looks like, but I don't like that indented offset look it has to it.

Here is the code for template.

{% extends 'base.html' %}

{% block title %}
    Register
{% endblock title %}


{% block content %}
    {% if form.errors %}
        {% for field in form %}
            {{ field.errors }}
        {% endfor %}
    {% endif %}


    <form method="post">
        {% csrf_token %}
        <div class="mt-4 mb-4">
            <label for="{{ form.first_name.label }}">
                {{ form.first_name.label }}
            </label>
            {{ form.first_name }}
        </div>
        <div class="mb-4">
            <label for="{{ form.last_name.label }}">
                {{ form.last_name.label }}
            </label>
            {{ form.last_name }}
        </div>
        <div class="mb-4">
            <label for="{{ form.username.label }}">
                {{ form.username.label }}
            </label>
            {{ form.username }}
        </div>
        <div class="mb-4">
            <label for="{{ form.email.label }}">
                {{ form.email.label }}
            </label>
            {{ form.email }}
        </div>
        <div class="mb-4">
            <label for="{{ form.password.label }}">
                {{ form.password.label }}
            </label>
            {{ form.password }}
        </div>
        <div class="mb-4">
            <label for="{{ form.password2.label }}">
                {{ form.password2.label }}
            </label>
            {{ form.password2 }}
        </div>
        <button class="btn btn-primary" type="submit">
            Register
        </button>
    </form>
{% endblock content %}

I have set ul > errorlist to list-display-type: none, in my css but that didn't fix the issue just removed the bullet point, which is good other than it displaying a bit indented on the actual page. Would really like to have it set to a p or span element.

Back to Top