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

Matt Benson mbenson at apache.org
Fri Jun 1 13:09:09 EDT 2012


It is my understanding that any path expression should be supported;
this is certainly how Apache BVal operates.  Note that validations are
still not cascaded, although Apache BVal provides a special
implementation-specific interface that permits this.

Matt

On Fri, Jun 1, 2012 at 12:03 PM, Gunnar Morling <gunnar at hibernate.org> wrote:
> 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
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev


More information about the beanvalidation-dev mailing list