Opened 9 years ago
Closed 9 years ago
#14863 closed defect (invalid)
Method isValidCreditCardNumber does not work correct
Reported by: | lexus | Owned by: | Karl Tiedt |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dojox | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Steps to reproduce: Call dojox.validate.isValidCreditCardNumber("a4111111111111", "VI");
Actual result: true
Expected result: false
Description:
According to source code problem IMHO in the line:
return Boolean(_b3.match(_b6[_b4.toLowerCase()]));
Possible solution:
it should be something like this:
return Boolean(_b3.match("^" + _b6[_b4.toLowerCase()] + "$"));
Change History (3)
comment:1 Changed 9 years ago by
Owner: | changed from Adam Peller to Karl Tiedt |
---|---|
Status: | new → assigned |
comment:3 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
All creditCard regex's are wrapped by
^ and $
already... so not sure what version you are testing against, but this is definitely working already
Actually the referenced code was fixed in 2010 [21885]
Note: See
TracTickets for help on using
tickets.
Karl, can you take a look?