skwasjer / IbanNet

C# .NET IBAN validator, parser, builder and generator
Apache License 2.0
119 stars 31 forks source link

Chinese bank account number (not IBAN, apparently) with only digits fails to validate with IllegalCountryCodeCharactersResult #187

Closed petre-c closed 7 months ago

petre-c commented 7 months ago

Describe the bug A validation for a Chinese bank account number fails with IllegalCountryCodeCharactersResult

image

2700 - sun shine.pdf

To Reproduce

new IbanNet.IbanValidator()
        .Validate("79220078814500000410");

Expected behavior Please see the invoice 2700 - sun shine.pdf

IbanNet library/version

.NET runtime

Operating system

petre-c commented 7 months ago

According to ChatGPT, China does not use IBAN codes in their bank account numbers.

Can you support validating Chinese bank account numbers?

NiKiZe commented 7 months ago

A IBAN number always has a countrycode. If you want to validate national bank accounts you need some other library.

skwasjer commented 7 months ago

@petre-c This library is specifically designed to validate IBAN's (as @NiKiZe also points out) according to the ISO13616 standard. So I am afraid we cannot help you out until maybe one day when China decides to adopt IBAN.

petre-c commented 6 months ago

Thank you, colleagues.