General interface that represents binding results. Extends the
interface for error registration capabilities,
allowing for a Validator to be applied, and adds
binding-specific analysis and model building.
Return a model Map for the obtained state, exposing a BindingResult
instance as 'MODEL_KEY_PREFIX + objectName'
and the object itself as 'objectName'.
Note that the Map is constructed every time you're calling this method.
Adding things to the map and then re-calling this method will not work.
The attributes in the model Map returned by this method are usually
included in the ModelAndView
for a form view that uses Spring's bind tag in a JSP,
which needs access to the BindingResult instance. Spring's pre-built
form controllers will do this for you when rendering a form view.
When building the ModelAndView instance yourself, you need to include
the attributes from the model Map returned by this method.
To be used when a target object cannot be constructed, making
the original field values available through Errors.getFieldValue(java.lang.String).
In case of a registered error, the rejected value will be exposed
for each affected field.