Issue Type: Improvement Improvement
Affects Versions: 5.0.0.CR3
Assignee: Unassigned
Components: engine
Created: 16/Mar/13 12:01 PM
Description:

If a constraint which has a generic and a cross-parameter validator is applied to a method with return value and parameters, its target must be specified using the element validationAppliesTo.

For XML-configured constraints the target could be derived automatically, since the constraint is unambigiously specified either within the return-value or cross-parameter elements. Currently one has to specify a constraint like so in this case:

<method name="findCustomer">
    <parameter type="java.lang.String"/>
    <parameter type="java.lang.String"/>
    <return-value>
        <constraint annotation="GenericAndCrossParameterConstraint">
            <element name="validationAppliesTo">RETURN_VALUE</element>
        </constraint>
    /return-value>
</method>

Note that the spec doesn't mandate the suggested behavior, but I think it would make sense to support it for the ease of use.

Fix Versions: 5.0.0.Final
Project: Hibernate Validator
Priority: Major Major
Reporter: Gunnar Morling
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira