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