Showing validation errors field by field

This commit is contained in:
Francesco committed 2023-10-10 21:30:49 +02:00
1 parent 8b88475d8a
commit 13b45e62b8
4 files changed
+46 -6

No files matched your search

@@ -1,3 +1,7 @@
.text-red {
color: red;
}
.separator-light {
opacity: 25%;
}
@@ -57,6 +57,10 @@
"></th:block>
</th:block>
<ul class="text-red mt-2" th:if="${validationErrors != null && !validationErrors.isEmpty()}">
<li th:each="error : ${validationErrors.forField(field.getName())}"
th:text="${error.getMessage()}"></li>
</ul>
<div class="separator mt-3 mb-2 separator-light"></div>
</div>