Jun 12th, 2012, 09:49 AM
Validation compatibility between JSR303 (Hibernate Validator) and SWF Validator?
I have model, previously developer for SWF (Spring Web Flow), and I've created @Component Validator for given model.
where the Validator implements single public method: `validate(User u, ValidationContext ctx)`;
When working with SWF form binding both JSR303 (annotation validation defined in Model class) and UserValidator are executed on binding.
I now need to proceed both validators in Spring @Controller on `@Valid @ModelAttribute User`
But every sample working with validating is working with method `validate(Class<T> data, BindingResult result)`
Is there option, to somehow let UserValidator fill up the ValidationContext variable and then transfer validation messages to BindingResult ?
Or did I terribly misunderstood something?
Tags for this Thread