Replace getErrors() with getBindingResult() in examples

DataBinder#getErrors was removed in v4.0.0.M1.

Closes gh-36170

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>

(cherry picked from commit 385e62dbf0)
This commit is contained in:
Tran Ngoc Nhan
2026-01-18 17:42:08 +07:00
committed by Sam Brannen
parent 13defc09f9
commit fd8b4d5936
2 changed files with 3 additions and 3 deletions
@@ -69,7 +69,7 @@ import org.springframework.web.util.WebUtils;
* // trigger actual binding of request parameters
* binder.bind(request);
* // optionally evaluate binding errors
* Errors errors = binder.getErrors();
* Errors errors = binder.getBindingResult();
* ...</pre>
*
* @author Rod Johnson
@@ -53,7 +53,7 @@ import org.springframework.web.multipart.support.StandardServletPartUtils;
* which include specifying allowed/required fields, and registering custom
* property editors.
*
* <p>Can also used for manual data binding in custom web controllers or interceptors
* <p>Can also be used for manual data binding in custom web controllers or interceptors
* that build on Spring's {@link org.springframework.web.context.request.WebRequest}
* abstraction: for example, in a {@link org.springframework.web.context.request.WebRequestInterceptor}
* implementation. Simply instantiate a WebRequestDataBinder for each binding
@@ -68,7 +68,7 @@ import org.springframework.web.multipart.support.StandardServletPartUtils;
* // trigger actual binding of request parameters
* binder.bind(request);
* // optionally evaluate binding errors
* Errors errors = binder.getErrors();
* Errors errors = binder.getBindingResult();
* ...</pre>
*
* @author Juergen Hoeller