Re: How to validate field in type of a model class by annotations.

2007-06-18 Thread Ruimo Uno
Thank you for your information. I have got xwork-2.0.3 and took diff against 2.0.1 in directory 'src/java/com/opensymphony/xwork2/validator/annotations'. It seems that the only change is just removing StringRegexValidator. Sounds like I should wait until 2.1 release. 2007/6/13, Jeromy Evans <[EMA

Re: How to validate field in type of a model class by annotations.

2007-06-13 Thread Jeromy Evans
public User getUser() {return user;} @EmailValidator(type = ValidatorType.FIELD, fieldName = "user.email", key = "email.invalid", message = "Invalid mail addrss") public void setUser(User user) {this.user = user;} I noticed that using @Validations, I

How to validate field in type of a model class by annotations.

2007-06-13 Thread Ruimo Uno
Hi, my action has a field that is in type of User: User user; public User getUser() {return user;} public void setUser(User user) {this.user = user;} And the following is a validation rule for it using XML file (Assume the User class has 'email' field.):