Мне требовался ввод, это работает, но почему неверный отзыв не отображается в модальном режиме HTML использует тимелеаф
<!-- AddStore Modal -->
<div class = "modal fade" id = "AddUserModal" tabindex = "-1" role = "dialog" aria-labelledby = "deleteModalLabel"
aria-hidden = "true">
<div class = "modal-dialog" role = "document">
<div class = "modal-content">
<div class = "modal-header">
<h5 class = "modal-title" id = "AddUserModalLabel">Add Store Form</h5>
<button class = "close" type = "button" data-dismiss = "modal" aria-label = "Close">
<span aria-hidden = "true">×</span>
</button>
</div>
<div class = "modal-body">
<form autocomplete = "off" action = "#" th:action = "@{/stores/add_store}"
th:object = "${store}" method = "post"
role = "form" id = "addModalForm">
<div class = "form-row">
<div class = "form-group col-md-6">
<label for = "addstoreName">Store Name</label>
<input type = "text" class = "form-control" id = "addstoreName" th:field = "*{storeName}"
required = "required"/>
<div class = "invalid-feedback">
Please provide a store name.
</div>
</div>
</div>
<div class = "form-row">
<div class = "form-group col-md-6">
<label for = "addStatus">Status</label>
<select id = "addStatus" class = "form-control" th:field = "*{status}">
<option th:value = "Ready_to_service">Ready to service</option>
<option th:value = "Temporarily_closed">Temporarily closed</option>
<option th:value = "Closed">Closed</option>
</select>
</div>
</div>
<div class = "modal-footer">
<button class = "btn btn-secondary" type = "button" data-dismiss = "modal">Cancel</button>
<button class = "btn btn-success" type = "submit" th:text = "Save"></button>
</div>
</form>
</div>
</div>
</div>
</div>



Не уверен, нашли ли вы решение или нет, так как это похоже на старый вопрос.
Вам не хватает, чтобы сообщить Thymeleaf об ошибке, специфичной для поля. Вы не привязали класс недействительной обратной связи к ошибке «поля». Попробуйте ниже кусок кода.
<input type = "text" class = "form-control" id = "addstoreName" th:field = "*{storeName}" required = "required"/>
<div class = "invalid-feedback" th:if = "${#fields.hasErrors('storeName')}" th:errors = "*{storeName}"></div>
Взгляните на рабочий пример здесь. Здесь это будет выглядеть так: