Announcement Announcement Module
Collapse
No announcement yet.
Validation compatibility between JSR303 (Hibernate Validator) and SWF Validator? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?
Working...
X