Skip to main content

BindingResult

Learn BindingResult (Form Handling, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes BindingResult holds the result of binding and validating one model attribute: the field errors, the global errors and the rejected values. Position rule : declare it immediately after the model attribute parameter, for example (@Valid Form f, BindingResult br) . Without it a binding or validation failure throws MethodArgumentNotValidException (or BindException ) and the user gets a 400 page.

More lessons in Form Handling