IbanNet 4.0.0

Provides an IBAN validator for verifying IBAN's.

There is a newer version of this package available.
See the version list below for details.
Install-Package IbanNet -Version 4.0.0
dotnet add package IbanNet --version 4.0.0
<PackageReference Include="IbanNet" Version="4.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IbanNet --version 4.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: IbanNet, 4.0.0"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

IbanNet is a .NET library providing functionality to validate and parse an International Bank Account Number also known as IBAN.

Example with validator

IIbanValidator validator = new IbanValidator();
ValidationResult validationResult = validator.Validate("NL91 ABNA 0417 1643 00");
if (validationResult.IsValid)
{
    // ..
}

Example with Iban type

Iban iban;
IIbanParser parser = new IbanParser(new IbanValidator());
bool success = parser.TryParse("NL91 ABNA 0417 1643 00", out iban);

v4.0.0

Improvements

  • Added IbanParser which provides equivalent non-static functionality to Iban.Parse and Iban.TryParse (which will be obsolete).
  • Added .NET Standard 2.1 target
  • Enabled and refactored for non-nullable reference types.
  • Added abstraction to load registry from different sources.
  • Added ICheckDigitsCalculator abstraction.
  • Exposing IIbanValidationRule allowing custom validation rules.
  • Performance improvements

Changes

  • (breaking) Iban.Parse and Iban.TryParse are obsolete, use IIbanParser.
  • (breaking) Added IbanValidator ctor overload accepting an IbanValidatorOptions class, providing options with validation method (strict = default vs loose), extensibility through custom rules.
  • (breaking) Refactored out enum IbanValidationResult, replaced with result object pattern for extensibility.
  • (breaking) ValidationResult now contains Error-property containing the error that occurred.
  • (breaking) Remove deprecated TypeConverter facade.
  • (breaking) Remove deprecated ctor (accepting Lazy).
  • (breaking) IbanValidator.SupportedCountries now is a dictionary, allowing look up by country code.
  • (breaking) Renamed CountryInfo to IbanCountry.
  • (breaking) Renamed ValidationResult.Value to ValidationResult.AttemptedValue.
  • (breaking) Moved Branch and Bank properties from BbanStructure to IbanCountry and all offsets are now relative to entire IBAN. This makes it easier to extract this data from an IBAN.
  • (breaking) IbanAttribute no longer uses static Iban.Validator as fallback since it is unclear it does so. The IIbanValidator will now only be resolved from IoC container and as such if not registered an exception is thrown.

IbanNet is a .NET library providing functionality to validate and parse an International Bank Account Number also known as IBAN.

Example with validator

IIbanValidator validator = new IbanValidator();
ValidationResult validationResult = validator.Validate("NL91 ABNA 0417 1643 00");
if (validationResult.IsValid)
{
    // ..
}

Example with Iban type

Iban iban;
IIbanParser parser = new IbanParser(new IbanValidator());
bool success = parser.TryParse("NL91 ABNA 0417 1643 00", out iban);

v4.0.0

Improvements

  • Added IbanParser which provides equivalent non-static functionality to Iban.Parse and Iban.TryParse (which will be obsolete).
  • Added .NET Standard 2.1 target
  • Enabled and refactored for non-nullable reference types.
  • Added abstraction to load registry from different sources.
  • Added ICheckDigitsCalculator abstraction.
  • Exposing IIbanValidationRule allowing custom validation rules.
  • Performance improvements

Changes

  • (breaking) Iban.Parse and Iban.TryParse are obsolete, use IIbanParser.
  • (breaking) Added IbanValidator ctor overload accepting an IbanValidatorOptions class, providing options with validation method (strict = default vs loose), extensibility through custom rules.
  • (breaking) Refactored out enum IbanValidationResult, replaced with result object pattern for extensibility.
  • (breaking) ValidationResult now contains Error-property containing the error that occurred.
  • (breaking) Remove deprecated TypeConverter facade.
  • (breaking) Remove deprecated ctor (accepting Lazy).
  • (breaking) IbanValidator.SupportedCountries now is a dictionary, allowing look up by country code.
  • (breaking) Renamed CountryInfo to IbanCountry.
  • (breaking) Renamed ValidationResult.Value to ValidationResult.AttemptedValue.
  • (breaking) Moved Branch and Bank properties from BbanStructure to IbanCountry and all offsets are now relative to entire IBAN. This makes it easier to extract this data from an IBAN.
  • (breaking) IbanAttribute no longer uses static Iban.Validator as fallback since it is unclear it does so. The IIbanValidator will now only be resolved from IoC container and as such if not registered an exception is thrown.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on IbanNet:

Package Downloads
IbanNet.FluentValidation
FluentValidation support to validate IBAN user input.
IbanNet.DataAnnotations
Data annotations to validate IBAN user input.
IbanNet.DependencyInjection.ServiceProvider
Microsoft.Extensions.DependencyInjection integration for IbanNet; IbanNet provides an IBAN validator and parser.
IbanNet.DependencyInjection.Autofac
Autofac IoC container integration for IbanNet; IbanNet provides an IBAN validator and parser.
IbanNet.Extensions.Bban
IbanNet extension to validate BBAN national check digits.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
4.3.0 23,015 11/27/2020
4.2.0 3,167 11/7/2020
4.1.0 32,917 8/8/2020
4.0.1 44,140 5/12/2020
4.0.0 24,345 2/8/2020
4.0.0-beta0241 302 2/8/2020
4.0.0-beta0227 240 2/8/2020
4.0.0-beta0223 365 2/8/2020
4.0.0-beta0222 330 2/8/2020
4.0.0-beta0204 329 2/6/2020
4.0.0-beta0190 336 1/14/2020
4.0.0-beta0187 275 1/13/2020
4.0.0-beta0186 238 1/13/2020
4.0.0-beta0183 304 1/13/2020
4.0.0-beta0178 8,544 12/30/2019
4.0.0-beta0177 279 12/29/2019
4.0.0-beta0172 329 12/29/2019
3.2.2 171 5/12/2020
3.2.1 24,764 1/14/2020
3.2.0 10,023 11/23/2019
3.1.2 836 10/25/2019
3.1.1 7,561 7/25/2019
3.1.0 19,543 5/10/2019
3.0.0 27,456 2/14/2019
2.1.0 25,268 9/18/2018
2.0.0 11,989 2/3/2018
1.2.0 717 12/25/2017
1.1.16 633 12/25/2017
1.0.19 734 12/25/2017
1.0.18 568 12/25/2017
1.0.17 622 12/25/2017