Say my command looks like this
public class MyForm {
@Max(99)
private int mode;
private MyObj myObj;
and my MyObj is
public class MyObj {
private String myStr;
private int myInt;
and my controller looks like this
@Controller
public class MyController {
@RequestMapping(value = "/Anything.htm")
public String AnythingMethod(@Valid MyForm myForm, .....
and my JSP looks like this
<form:input path="mode"/>
<form:input path="myObj.myStr"/>
how can I inject validation such as @NotNull @MAx @Min for myStr and myInt? how can I specify their error messages in messages.properties? Please help.