Answer the question
In order to leave comments, you need to log in
Validation errors stack, how to fix?
Tell me why is this happening? Why are validation errors one on one?
In the developer console, it shows only 2 spans, on the screen you can clearly see that there are more.
Through ctrl+F5 new ones appear...
I use SpringMVC. The controller returns a ModelAndView object.
It uses the following code:
if (bindingResult.hasErrors()) {
modelAndView.setViewName("registration");
modelAndView.addObject("user", user);
return modelAndView;
}
<span class="alert alert-danger" th:if="${#fields.hasErrors('name')}" th:errors="*{name}"></span>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question