<div class="input-group mb-3">
  <label class="sr-only" for="{{ form.username.id_for_label }}">{{ form.username.label }}</label>
  <input
      class="form-control{% if form.username.errors %} is-invalid{% endif %}"
      id="{{ form.username.id_for_label }}"
      name="{{ form.username.html_name }}"
      placeholder="{{ form.username.label }}"
      type="text"
      value="{{ form.username.value|default_if_none:'' }}">
  <div class="input-group-append">
    <div class="input-group-text">
      <span class="fas fa-user"></span>
    </div>
  </div>
  {% if form.username.errors %}
  <div class="invalid-feedback" id="{{ form.username.id_for_label }}-feedback">
    {{ form.username.errors.as_ul }}
  </div>
  {% endif %}
</div>