Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
validator: stopOnFirstError Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • validator: stopOnFirstError

    Hi all,

    I'm using commons validator throught DefaultBeanValidator. But when it founds the first validation error, stops validating and returns only this one.

    I want to set a behavior like stopOnFirstError in org.apache.struts.validator.ValidatorPlugIn.

    Any ideas?


    Last edited by jantoniucci; Mar 13th, 2007, 03:54 AM. Reason: More self-explain title

  • #2
    I found that the roots of "validating until first error" is in the classes org.apache.commons.validator.Form and org.apache.commons.validator.Field , more precisely in the validate method where is documented as "Run the configured validations on this field. Run all validations in the depends clause over each item in turn, returning when the first one fails"

    So, the solutions is around building subclasses with the needed behavior,

    Any alternative idea?