在java中验证IBAN/BIC的可靠方法
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/994790/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
reliable way to validate IBAN/BIC in java
提问by tehvan
Does anyone know of a reliable way to validate International Bank Account Number (IBAN) and Bank Identifier Code (BIC) in java?
有谁知道在java中验证国际银行帐号(IBAN)和银行识别码(BIC)的可靠方法吗?
采纳答案by Brandon E Taylor
These might be worth a look:
这些可能值得一看:
http://soastation.googlepages.com/iban-checkdigit-src.jar
http://soastation.googlepages.com/iban-checkdigit-src.jar
http://developers.sun.com/docs/javacaps/designing/capsswftintprj.ghfyv.html
http://developers.sun.com/docs/javacaps/designing/capsswftintprj.ghfyv.html
回答by Milanka
Apache Commons Validator has IBAN validation (since version 1.4)
Apache Commons Validator 具有 IBAN 验证(自 1.4 版起)
Home page: http://commons.apache.org/validator/
主页:http: //commons.apache.org/validator/
Javadoc:https: //commons.apache.org/proper/commons-validator/apidocs/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.html
Maven dependency:
Maven 依赖:
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.6.0</version>
</dependency>
Edit: Updated javadoc link.
编辑:更新了 javadoc 链接。
回答by Marc Wrobel
Apache Commons Validator is good for IBAN validation, but lacks BBAN structure validation (as specified in IBAN registry).
Apache Commons Validator 适用于 IBAN 验证,但缺少 BBAN 结构验证(如IBAN 注册表中所指定)。
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).
我刚刚发布了一个名为 jbanking 的库,它可能适合您的需要。它包含用于 IBAN 和 BIC 验证的例程。您可以在 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.
但请注意,如果不使用IBAN Plus Directory(以前称为BICplusIBAN Directory)和Bank directory Plus(以前称为BIC directory),就无法获得可靠的 BIC/IBAN 验证。两者均由 BIC/IBAN 注册商 SWIFT 提供并定期更新。不幸的是,这些目录不是免费提供的。
回答by user2835655
This library provides an IBAN class supporting BBAN structure validation.
这个库提供了一个支持 BBAN 结构验证的 IBAN 类。
回答by vaskenzis
This is a library of utilities to assist with developing banking functionality. https://github.com/marcwrobel/jbanking
这是一个帮助开发银行功能的实用程序库。 https://github.com/marcwrobel/jbanking
回答by Artur Mkrtchyan
iban4j might be good choice for IBAN validation.
iban4j 可能是 IBAN 验证的不错选择。
home page: https://github.com/arturmkrtchyan/iban4j
主页:https: //github.com/arturmkrtchyan/iban4j
Maven dependency:
Maven 依赖:
<dependency>
<groupId>org.iban4j</groupId>
<artifactId>iban4j</artifactId>
<version>1.0.0</version>
</dependency>