-
Aug 31st, 2007, 09:35 AM
#1
validation at the data tier
I have a bean that is populated in another tier and sent to me via web services. I am responsible for verifying the bean before persisting it. I would like to use spring validation where I will be responsible for calling validate() on the Validator implementation and passing in an Errors implementation to the validate() call. What Errors implementation should I use? Should I create my own?
Thanks in advance...
-
Sep 1st, 2007, 06:46 AM
#2
I think I've found how to use the validator without the MVC framework:
BindException validatePersonWebServiceMethod(Person person) {
...
Validator validator = new PersonValidator();
BindException errors = new BindException(person, "target");
...
validator.validate(person, errors);
...
return errors;
}
The only thing I need to do is to work out how to send a BindException via. the webservice. Any suggestions?
Thanks in advance ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules