add method ValidatorImpl.validateElement(Annotation[], Class<?>, Type, Object value,
Class<?>... groups)
--------------------------------------------------------------------------------------------------------
Key: HV-549
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-549
Project: Hibernate Validator
Issue Type: New Feature
Reporter: George Sapountzis
ValidatorImpl currently supports methods for validating bean properties / method
parameters. Looking from the outside, I don't see a strong reason for using bean
properties / method parameters other than that these elements are annotation
placeholders.
Using TypeLiteral/AnnotationLiteral helper classes it seems possible to construct all the
necessary metadata for a validation point programmatically. So, I propose to add a generic
method where the annotations/type are passed by the user. The passed value need not be a
bean, it could be a *primitive* value. The resulting set of constraint violations will
just have a null root bean / method.
Hope you consider this a valid case and add such a method, or advise on an alternative way
to achieve the same functionality. I'd like to do this without writing straw
beans/methods and introspecting them just for the sake of adapting to the API. I am not
able to find my way around to achieving this currently.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira