reliable way to validate IBAN/BIC in java [closed]
Asked Answered
M

6

24

Does anyone know of a reliable way to validate International Bank Account Number (IBAN) and Bank Identifier Code (BIC) in java?

Mcvay answered 15/6, 2009 at 6:59 Comment(1)
Rephrased the original question. I'm no longer using the dreadful word "library", which caused the question to be closed as off-topicMcvay
K
7

These might be worth a look:

http://soastation.googlepages.com/iban-checkdigit-src.jar

http://developers.sun.com/docs/javacaps/designing/capsswftintprj.ghfyv.html

Kaenel answered 15/6, 2009 at 7:9 Comment(1)
Brandon, your first link works fine (just downloads a jar file with no copyright etc, is this what you intended?) The second link though, is broken. Looks like Oracle doesn't like it much.Desexualize
F
38

Apache Commons Validator has IBAN validation (since version 1.4)

Home page: http://commons.apache.org/validator/

Javadoc: https://commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.html

Maven dependency:

<dependency>
  <groupId>commons-validator</groupId>
  <artifactId>commons-validator</artifactId>
  <version>1.7</version>
</dependency>

Edit: Updated javadoc link.

Fibula answered 16/8, 2012 at 6:53 Comment(1)
The correct link to the javadoc is:commons.apache.org/proper/commons-validator/javadocs/api-1.4.0/…Poulter
P
16

Apache Commons Validator is good for IBAN validation, but lacks BBAN structure validation (as specified in IBAN registry).

I have just released a library, named jbanking, that might suits your need. It contains routines for both IBAN and BIC validation. You can find it on github (https://github.com/marcwrobel/jbanking).

But note that you cannot have a reliable BIC / IBAN validation without using the IBAN Plus Directory (formely known as the BICplusIBAN Directory) and the Bank directory Plus (formely known as the BIC directory). Both are provided and regularly updated by SWIFT which is the BIC / IBAN registrar. Unfortunately those directories are not available for free.

Puentes answered 2/7, 2013 at 22:38 Comment(0)
K
7

These might be worth a look:

http://soastation.googlepages.com/iban-checkdigit-src.jar

http://developers.sun.com/docs/javacaps/designing/capsswftintprj.ghfyv.html

Kaenel answered 15/6, 2009 at 7:9 Comment(1)
Brandon, your first link works fine (just downloads a jar file with no copyright etc, is this what you intended?) The second link though, is broken. Looks like Oracle doesn't like it much.Desexualize
T
5

iban4j might be good choice for IBAN validation.

home page: https://github.com/arturmkrtchyan/iban4j

Maven dependency:

<dependency>
      <groupId>org.iban4j</groupId>
      <artifactId>iban4j</artifactId>
      <version>1.0.0</version>
</dependency>
Taimi answered 15/12, 2013 at 17:12 Comment(3)
Hello, I just reviewed and finally decided to use your library. Nice work and simple API. Many thanks for sharing!Perse
what should be my motivation NOT to use Apache IBAN Validator, if I only want to validate IBAN?Chrysarobin
Above library is outdated, another alternative is github.com/barend/java-ibanDietetics
M
1

This is a library of utilities to assist with developing banking functionality. https://github.com/marcwrobel/jbanking

Maratha answered 24/10, 2013 at 12:55 Comment(0)
P
0

This library provides an IBAN class supporting BBAN structure validation.

http://www.jdtaus.org/ISO-13616/current/index.html

Pleat answered 1/10, 2013 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.