Hello,

I would like to validate every argument sent to a service method with a org.springmodules.validation.bean.BeanValidator.

I've not found any ValidationMethodInterceptor class in springmodules 0.9.

Am I missing something ?

I've found a lot of samples on the web :
http://nishgoel.blogspot.com/2005_10_01_archive.html
http://my-garbage-collector.blogspot...alidation.html
http://www.google.fr/url?sa=t&ct=res...2yOduX63PI_GiQ

If there's no interceptor in springmodules wouldn't it be interesting to add one (appears to be a common need) ?

Thanks

N.B sample of code of interceptor (didn't tested it or even compiled it, just to illustrate the idea) :
Code:
public class ValidationInterceptor implements MethodBeforeAdvice {
    
    private Validator validator = null;
    
    public void     before(Method method, Object[] args, Object target) {
    for (Object arg : args) {
            Errors lErrors = new BindException(lPerson, Integer.valueOf(i));
            validator.validate(arg, lErrors);
            if (lErrors.hasErrors()) {
                throw lErrors;
            }
        }
        method.invoke (target, args);
    }
    
    public void setValidator (BeanValidator aValidator) {
        mValidator = aValidator;
    }
}