Basically BindingResult
is an interface which dictates how the object that stores the result of validation should store and retrieve the result of the validation(errors, attempt to bind to disallowed fields etc)
From Spring MVC Form Validation with Annotations Tutorial:
[
BindingResult
] is Spring’s object that holds the result of the validation and binding and contains errors that may have occurred. TheBindingResult
must come right after the model object that is validated or else Spring will fail to validate the object and throw an exception.When Spring sees
@Valid
, it tries to find the validator for the object being validated. Spring automatically picks up validation annotations if you have “annotation-driven” enabled. Spring then invokes the validator and puts any errors in theBindingResult
and adds the BindingResult to the view model.