THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
public class SimpleField extends ActionSupport{ @NotNull() @NotEmpty @Length(max = 3) private String name; ... } |
Use the @AssertValid annotation to validate nested objects, like
Code Block |
---|
public class MemberObject extends ActionSupport {
@AssertValid
private Person person = new Person();
public Person getPerson() {
return person;
}
}
|
XML Configuration
OVal provides support for defining the validation via XML. Validation files must end in "-validation.xml" and the rules to find them, are the same rules used to find the validation XML files used by the regular validation mechanisms (default validation in xwork):
...