-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Stop validation routine on first validation failure
PostPosted: Thu Jul 17, 2008 4:54 am 
Beginner
Beginner

Joined: Thu Apr 17, 2008 5:47 pm
Posts: 26
Quote:
3.4. Group and group sequence
...; if one of the
group process in the sequence leads to one or more validation failure, the groups following in the sequence must
not be processed.

3.5. Validation routine
...
The object validation routine is described as such. For each constraint declaration and in the previously defined order:
• execute the isValid operation (from the constraint validation implementation) on the appropriate data (see Section
2.3)
• if isValid returns true, continue to the next constraint,
• if isValid returns false, the Bean Validation provider populate an InvalidConstraint object and append it to
the list of returned values


There are use cases when we want the validation process (routine) to stop on the first violated constraint, so that we do not spent unduly time.
I think that this is the usual case - we validate some instace or graph of instances and if some constraint is violated, no matter which one we should stop ignoring the order the constraints are checked into the group.

Collecting errors is more usefull in UI wizards or something like that when you want to draw them back to the user, so that they can be corrected easily.

The current specification lacks the feature to stop the validation routine on the first violated constraint.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.