-
Jun 12th, 2012, 09:49 AM
#1
Validation compatibility between JSR303 (Hibernate Validator) and SWF Validator?
Hi,
I have model, previously developer for SWF (Spring Web Flow), and I've created @Component Validator for given model.
Model: User
Validator: UserValidator
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
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