I am using the hibernate implementation of jsr303 for server side validation. When Set<ConstraintViolation<?>> is returned I immediately add the errors to a BindingResult for display on the page. I display the errors with a form:errors tag all in one location. The errors display on the page in any random order. Is there any way to coax Spring into displaying the errors according to the order of the fields on the page?
I am using the hibernate implementation of jsr303 for server side validation. When Set<ConstraintViolation<?>>
Share
You can sort the field errors using a custom
Comparator: