Fix code example for validation on functional endpoints

Closes gh-23020
This commit is contained in:
Diego Castro 2019-05-24 04:41:17 -03:00 committed by Sam Brannen
parent 82d0e49de9
commit 2f8aa368fe
1 changed files with 2 additions and 2 deletions

View File

@ -253,8 +253,8 @@ public class PersonHandler {
}
private void validate(Person person) {
Errors errors = new BeanPropertyBindingResult(body, "person");
validator.validate(body, errors);
Errors errors = new BeanPropertyBindingResult(person, "person");
validator.validate(person, errors);
if (errors.hasErrors) {
throw new ServerWebInputException(errors.toString()); <3>
}