From 07ec131125b5717a5f085ca2c4dce67542082fea Mon Sep 17 00:00:00 2001 From: Dylan Verheul Date: Sun, 19 Oct 2025 12:58:49 +0200 Subject: [PATCH 1/2] Revert "Make sure that field errors are always visible (#767)" This reverts commit b49879ced1a411f82ea07d8c2a64727f49c77c64. --- .../templates/django_bootstrap5/field_errors.html | 4 ++-- tests/test_bootstrap_field_input_checkbox.py | 4 ++-- tests/test_bootstrap_field_input_text.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/django_bootstrap5/templates/django_bootstrap5/field_errors.html b/src/django_bootstrap5/templates/django_bootstrap5/field_errors.html index 93b2eabd..ab00ed7b 100644 --- a/src/django_bootstrap5/templates/django_bootstrap5/field_errors.html +++ b/src/django_bootstrap5/templates/django_bootstrap5/field_errors.html @@ -1,7 +1,7 @@ {% if field_errors %} -
+
{% for text in field_errors %} -
{{ text }}
+
{{ text }}
{% endfor %}
{% endif %} diff --git a/tests/test_bootstrap_field_input_checkbox.py b/tests/test_bootstrap_field_input_checkbox.py index 54c81a3e..0d4e3252 100644 --- a/tests/test_bootstrap_field_input_checkbox.py +++ b/tests/test_bootstrap_field_input_checkbox.py @@ -39,8 +39,8 @@ def test_input_type_checkbox_is_invalid(self): '
' '' '' - '
' - '
This field is required.
' + '
' + '
This field is required.
' "
" "
" "
" diff --git a/tests/test_bootstrap_field_input_text.py b/tests/test_bootstrap_field_input_text.py index 3daf2365..f2bd9caa 100644 --- a/tests/test_bootstrap_field_input_text.py +++ b/tests/test_bootstrap_field_input_text.py @@ -43,8 +43,8 @@ def test_input_type_text(self): '' '' - '
' - '
This field is required.
' + '
' + '
This field is required.
' "
" "
" ), @@ -201,8 +201,8 @@ def test_input_validation_failure(self): 'foo' '' - '
' - '
This field is required.
' + '
' + '
This field is required.
' "
" "
" "
" From dc96965299007ace0ebfb09382b6608150699870 Mon Sep 17 00:00:00 2001 From: Dylan Verheul Date: Sun, 19 Oct 2025 13:00:39 +0200 Subject: [PATCH 2/2] Revert #767 --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 689a4e35..18954b6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ ## In development -- Make sure that field errors are always visible (#767, @xi). - Add support for Python 3.14 (#774). - Add support for Django 6.0 (#773). - Update settings.rst (#756, @inpool).