-
1. Re: CreditCardNumber
darthmaul Aug 19, 2008 4:57 AM (in response to rkilcoyne.rkilcoyne.mac.com)I cannot speak to the effectiveness of @CreditCardNumber because I wrote my own annotation using Apache Commons Validator. If I understand correctly, the Hibernate Validator version uses the Luhn algorithm for validation while the Commons version uses that and additional mechanisms to verify against the type of card. The implementation is fairly trivial, and it works for me.
As far as @CreditCardNumber, perhaps you could post the manner you are annotating your entity and how you are using one of the Seam JSF validation controls to activate it.
Thanks.
-
2. Re: CreditCardNumber
bhiles Aug 19, 2008 5:18 AM (in response to rkilcoyne.rkilcoyne.mac.com)Do you have hibernate-commons-annotations.jar in your classpath? Some of the Hibernate validations need that extra bit to work. I ran into the same issue with EAN validation.
-
3. Re: CreditCardNumber
rkilcoyne.rkilcoyne.mac.com Aug 19, 2008 1:53 PM (in response to rkilcoyne.rkilcoyne.mac.com)This was my first instinct, so I added hibernate-commons-annotations.jar to my deployed-jars-ear.list. No luck. Then tried adding to the deployed-jars-war.list -- same result. What I find really odd is that other annotation validators such as @Length work fine.
-
4. Re: CreditCardNumber
rkilcoyne.rkilcoyne.mac.com Aug 19, 2008 4:17 PM (in response to rkilcoyne.rkilcoyne.mac.com)Still working on this issue...
One question about annotations: Are they linked/applied at compile time or runtime? My understanding was that they're essentially a programming shortcut implemented at compile time.
As far as this validator goes... it's not being called from my entity object. Very odd. Other org.hibernate.* validators -- no problem.