[bv-dev] Is it allowed to validate complete paths using Validator#validateProperty()

Gunnar Morling gunnar at hibernate.org
Fri Jun 1 13:03:15 EDT 2012


Hi,

I just stumbled upon a question on SO [1], which basically is about
whether it's allowed to pass a complete property path (e.g.
"foos[1].bar") to Validator#validateProperty(), or whether only single
properties (e.g. "foos") can be validated using that method.

Based on a quick look into the API doc and the spec, I'd say only
single properties are supported here right now (the doc of the
parameter "propertyName" describes it as "property to validate"), but
I'm not really sure. WDYT?

If this is not supported as of BV 1.0, do you think it should be in 1.1?

--Gunnar

[1] http://stackoverflow.com/questions/10835595/hibernate-validator-calling-validatepropertyobject-list0-field1-groups-o


More information about the beanvalidation-dev mailing list