Announcement Announcement Module
Collapse
No announcement yet.
How to set the order in which validations are performed when using @Valid? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to set the order in which validations are performed when using @Valid?

    Hi,

    I'm using the @Valid annotation to perform validations after a form submit. (Spring MVC 3.1)

    Error messages are then displayed in the page based on these validations.

    The problem is that I need to control how these messages are displayed (in other words, in which order they are displayed).

    I know it can be done by using groups, but it seems like a patch to me. Groups don't seem to be meant for that... but maybe I'm wrong?!?
    And also, I don't want to define a group (a new interface) for each property of my bean... it needs to be simpler than that...

    So, my question ... is there a proper way to set the order in which validations will be performed?

    Thanks.
Working...
X