beanvalidation/beanvalidation.org — comment on commit bc37cfec514b79f7695ccb35f9990115c5fdeab8
File: proposals/BVAL-241.md line 123
By emmanuelbernard:

@gunnarmorling I want to be able to write a cross parameter annotation that is generic and reusable regardless of the method I am applying it on. In my example, I could make sure that two Date parameters have proper causality and the way to point to the parameters at bay I use their position.

@Causal(first=1, second=3)
public void book(Date from, BigDecimal price, Date to);

@Causal(first=1, second=2)
public void rent(Date from, Date to, BigDecimal price);