title: How to check an IBAN number using the Apache IBANCheckDigit?
body: <p>In my Android app, I'm trying to check if an IBAN bank account number is valid. This supposedly can be done using the <a href="http://commons.apache.org/proper/commons-validator/javadocs/api-1.4.0/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.html" rel="nofollow">Apache IBANCheckDigit</a>. I now try do so as follows:</p>
  
  <pre><code>IBANCheckDigit a = new IBANCheckDigit();
  try {
      String checkDigit = a.calculate("MY_IBAN_NUMBER_HERE");
      Boolean b = a.isValid(checkDigit);
      Log.e("isValid: ", b.toString());
  } catch (CheckDigitException e) {
      Log.e(this, "THIS IS AN ERROR");
  }
  </code></pre>
  
  <p>This however, always prints <code>false</code>. Even if I insert my own (correct) IBAN-number, it also gives a <code>false</code>.</p>
  
  <p>Does anybody know how to use this Apache IBANCheckDigit? Any tips are welcome!</p>