How to get error text in controller from BindingResult?
Disclaimer: I still do not use Spring-MVC 3.0 But i think the same approach used by Spring 2.5 can fullfil your needs for (Object object : bindingResult.getAllErrors()) { if(object instanceof FieldError) { FieldError fieldError = (FieldError) object; System.out.println(fieldError.getCode()); } if(object instanceof ObjectError) { ObjectError objectError = (ObjectError) object; System.out.println(objectError.getCode()); } } I hope it can … Read more