[ 
https://issues.apache.org/jira/browse/VALIDATOR-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13885444#comment-13885444
 ] 

Sebb commented on VALIDATOR-330:
--------------------------------

In theory it is quite easy to check for invalid check digits (must be numeric, 
and in range 02-98)

Some countries use fixed numbers for the check digits (e.g. because their 
national code already includes a similar check digit scheme).
Unfortunately it appears that Jordan has decided to use 99 as the fixed numbers 
- this would require special treatment.

Further research is needed to determine whether there are any other anomalies 
(e.g. non-numeric check digits?).

Also, should the validation method treat "impossible" check digits as merely 
incorrect, or should they be treated as invalid characters, in which case an 
Exception is thrown?


> IbanCheckDigit.isValid() returns True for some invalid IBANs
> ------------------------------------------------------------
>
>                 Key: VALIDATOR-330
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-330
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Routines
>    Affects Versions: 1.4.0 Release
>            Reporter: Peter Shawe
>            Assignee: Sebb
>
> For example, isValid() returns True for both of these IBANs; 
> "IE01AIBK93118702569045" and "IE98AIBK93118702569045".  The "IE98" version is 
> the correct one (confirmed with online checkers, which also fail the "IE01" 
> version).
> calculate() correctly returns "98".  As a workaround I'm calling calculate() 
> and comparing the result with the checksum in the original IBAN.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to