some feedback for
http://in.relation.to/Bloggers/Constrai ... tionJSR303
I implemented this at
http://code.google.com/p/agimatec-validation/, while the reference implementation does not yet support it.
Some questions/missing information for the spec. to clarify:
1. In case of @ReportAsSingleInvalidConstraint
Can validation of the constraint stop when some composed constraint reports invalidity?
How should the composed constraint error report look like? Do the error reports from the nested constraints NOT appear to the invoker or will interface InvalidConstraint need extension to return the getComposedInvalidConstraints()?
2. according to method Validator.validateValue() + validateProperty()
It seems (also when looking into the reference implementation), that there is no reliable way to determine the constraints for a property, especially when a complex property path (author.addresses[3].country) is given as "propertyName". Maybe you will have to think about this more...? (or I did not understand it, sorry then.)
3. Method ConstraintDescriptor.getConstraintImplementation() disappeared from the spec. It seems that it would be neccessary (for the implementation as well as for the metadata API)...
Bootstrapping:
----------------
The part of the spec describing what should be configurable in the META-INF/validation.xml file is not clear to me. Does it configure the ValidationFactory or the ValidationBuilder (or both)?
In which situation is the stream used?
Method ValidatorBuilderImplementor.getConfigurationStream() - is this required to be public or just called inside a specific implementation of a provider, so that it can be deleted from the interface?
To clarify the use of the bootstrapping-API, it would be helpful to have another example showing the preferred way to create 2 validators for the same object, but with different locales on their MessageResolvers. This would show, if two factories are needed (when the MessageResolver could be configurated at the ValidationBuilder) or if a single factory (with vendor-specific APIs) can do it.
By the way: the spec does not clarify whether ValidationBuilder.build() can be called multiple times on the same instance.