[hibernate-issues] [Hibernate-JIRA] Created: (HV-34) AbstractLuhnValidator and EANValidator perform unnecessary calculations in some circumstances

WATANABE Takashi (JIRA) noreply at atlassian.com
Wed Jul 11 20:28:52 EDT 2007


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

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