[bv-dev] Legal to validate constraints more than once?
Gunnar Morling
gunnar at hibernate.org
Mon Jan 21 09:36:08 EST 2013
Hi all,
I'm wondering whether it's legal that one constraint gets validated more
than once during one validation operation. The spec seems a bit
contradictory in this regard.
In section 4.6 "Validation routine" [1] it says:
"[...] this implies that a given validation constraint will not be
processed more than once per validation."
Section 4.6.1 "Object graph validation" says though:
"[...] object graph navigation can lead to multiple validations of the same
constraint and the same object instance but the set of constraint
validation is deterministic and the algorithm prevents infinite loops."
What is right here? Or is this to say that *only* during graph validation a
constraint may be validated multiple times but not e.g. during validation
of multiple groups, all of which a constraint is part of?
Thanks,
--Gunnar
[1]
http://beanvalidation.org/latest-draft/spec/#constraintdeclarationvalidationprocess-validationroutine
[2]
http://beanvalidation.org/latest-draft/spec/#constraintdeclarationvalidationprocess-validationroutine-graphvalidation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20130121/ca61d995/attachment.html
More information about the beanvalidation-dev
mailing list