「Spring入門」@ValidとBindingResultの使い方
Javaコード:
public String insert(@Valid EmployeeForm employeeForm, BindingResult result) {
if (result.hasErrors()) {
super.errors.addAllErrors(result);
//some code
return “xxx";
}
//some code
}
Coding Changes the World
Javaコード:
public String insert(@Valid EmployeeForm employeeForm, BindingResult result) {
if (result.hasErrors()) {
super.errors.addAllErrors(result);
//some code
return “xxx";
}
//some code
}