[bv-dev] Is it allowed to validate complete paths using Validator#validateProperty()
Hardy Ferentschik
hardy at hibernate.org
Mon Jun 4 08:02:07 EDT 2012
On Jun 4, 2012, at 1:46 PM, Emmanuel Bernard wrote:
> Hi,
>
> It was meant to be supported in a future version and to let implementors experiment with such a support first.
> If we officially support it we need to:
>
> - standardize the String representation of a Path, which is something we shied away from in 1.0
In this context we also need to think about how to represent method level validation paths.
Property paths are relative straight forward (based on users experience with EL) and I have not come across
a case where someone had problems with the approach taken for example in Hibernate Validator.
Finding a good path representation for method level validation is harder though.
> - offer an alternative methods accepting Path ; we would also need to offer a PathBuilder of sort
The more I think about it the more I like the idea of having a #validateProperty and #validateValue
which take a Path instance as parameter.
--Hardy
More information about the beanvalidation-dev
mailing list