Such feature would be useful for generic constraints like @ScriptAssert and a generic @EqualsPasswords
Yes, exactly.
We could have constraints annotated with both @CrossParameterConstraint and @Constraint.
Would we even need @CrossParameterConstraint? If a constraint author wants to support a constraint on cross-parameters, she would just have to provide a validator for Object[]. In other words, cross-parameters (an object array) would just be another supported type for a validator. If a constraint author doesn't not want a constraint to be applicable for cross-parameters, she would just omit the validationAppliesTo attribute (which we'd have to support for backwards-compatability reasons anyways).
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
Yes, exactly.
Would we even need @CrossParameterConstraint? If a constraint author wants to support a constraint on cross-parameters, she would just have to provide a validator for Object[]. In other words, cross-parameters (an object array) would just be another supported type for a validator. If a constraint author doesn't not want a constraint to be applicable for cross-parameters, she would just omit the validationAppliesTo attribute (which we'd have to support for backwards-compatability reasons anyways).