[hibernate-issues] [Hibernate-JIRA] Commented: (HV-34) AbstractLuhnValidator and EANValidator perform unnecessary calculations in some circumstances
WATANABE Takashi (JIRA)
noreply at atlassian.com
Fri Jul 13 10:31:52 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27492 ]
WATANABE Takashi commented on HV-34:
------------------------------------
@NotNull
@CreditCardNumber
public String getCreditCard()
{
return creditCard;
}
> AbstractLuhnValidator and EANValidator perform unnecessary calculations in some circumstances
> ---------------------------------------------------------------------------------------------
>
> Key: HV-34
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-34
> Project: Hibernate Validator
> Issue Type: Bug
> Components: validators
> Reporter: WATANABE Takashi
> Priority: Trivial
> Attachments: 20070710_2205.patch.txt, 20070710_2205.patch2.txt, 20070710_2205.tar.bz2
>
>
> There are decimal digits other than ASCII ones.
> e.g. full width digits(from \uff10 to \uff19)
> So if a Japanese customer(or someone) entered full width digits, the current AbstractLuhnValidator and EANValidator would perform some unnecessary calculations.
> BTW, I think I'm going to use them with something like @Pattern(regex="^\\d*$", message="Must be ASCII digits")
> and @NotNull.
> Becase I don't like my customers to enter full width digits
> rather than ASCII ones.
> Otherwise, it might be possible for them to handle all decimal
> digits in the world(Unicode).
> Then, I would use them with @Pattern(regex="^\\d*$") anyway ;-)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list