How to get error text in controller from BindingResult
- by Mike
I have an controller that returns JSON. It takes a form, which validates itself via spring annotations. I can get FieldError list from BindingResult, but they don't contain the text that a JSP would display in the tag. How can I get the error text to send back in JSON?
@RequestMapping(method = RequestMethod.POST)
public
@ResponseBody…