Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

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.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
validator: stopOnFirstError Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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?

    Thanks.

    Javier
    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?

    Thanks!

    Javier

    Comment

    Working...
    X