'How can I display error on front after bindingResult.reject?
I reject bindingresult without a field, like this, but how can I display it now?
bindingResult.reject("insufficient.funds.exception",
"You don not have enough money");
This does not work, it seems like if I do not specify the field, it is still not a global error
<p style="color: red"
th:if="${#fields.hasGlobalErrors()}"
th:each="error : ${#fields.errors('global')}"
th:text="${error}">
Validation error</p>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
