On Jan 5, 2012, at 12:56 PM, Cemo wrote:
Thanks for summing up.
No problem. I will try to sum this up on
beanvalidation.org asap as well.
1. I am not sure whether I file another issue or not but if there is
an opportunity I would like set error message via violating constraint. :)
@ReportAsSingleViolation(shortCircuit=true, messageSource=ByOriginatingConstraint)
I would open a new issue
2. As you stated the intuitive approach is simple integer value. But
maybe It can be nice too
@NotEmpty()
@IsValidBinCodeNumber()
@IsCardBannedNumber()
@IsValidCardNumber()
@ConstraintSequence(value={NotEmpty.class, IsValidBinCodeNumber
.class,IsCardBannedNumber.class, IsValidCardNumber.class}, shortCirtcuit=true)
private String creditCard;
How would this approach handle multiple constraints of the same type, for examples
multiple Pattern constraints via Pattern.List
--Hardy