- Implement
IParsable<TSelf>on Iban type in skwasjer#138
- perf: use code generation to unroll pattern match per country (SWIFT only) by @skwasjer in skwasjer#192
- fix(xUnit1012): address static code analysis by @skwasjer in skwasjer#190
- chore(deps): Bump BenchmarkDotNet.Diagnostics.Windows from 0.13.10 to 0.13.12 by @dependabot in skwasjer#191
Full Changelog: https://github.com/skwasjer/IbanNet/compare/v5.13.0...v5.14.0
- feat(net8): add .NET 8 target framework by @skwasjer in skwasjer#180
- ci: add NuGet packages.lock.json and cache NuGet folder by @skwasjer in skwasjer#178
- ci(nuget): partially revert "ci: add NuGet packages.lock.json and cac… by @skwasjer in skwasjer#179
- ci: refactor workflows by @skwasjer in skwasjer#177
- chore(deps): Bump xunit from 2.4.2 to 2.6.1 by @dependabot in skwasjer#176
- chore(deps): Bump BenchmarkDotNet.Diagnostics.Windows from 0.13.9 to 0.13.10 by @dependabot in skwasjer#175
- chore: .NET 8/CS12 style and perf by @skwasjer in skwasjer#181
- chore: reduce build runtime by excluding satellite assemblies (in tests) by @skwasjer in skwasjer#182
- chore(deps): Bump MicrosoftNetTestSdk from 17.7.2 to 17.8.0 by @dependabot in skwasjer#183
- chore(deps): Bump xunit from 2.6.1 to 2.6.2 by @dependabot in skwasjer#186
- ci: remove AppVeyor CI by @skwasjer in skwasjer#189
Full Changelog: https://github.com/skwasjer/IbanNet/compare/v5.12.0...v5.13.0
- Add german translation by @janro1 in skwasjer#172
- chore(deps): Bump NSubstitute from 5.0.0 to 5.1.0 by @dependabot in skwasjer#171
- chore(deps): Bump BenchmarkDotNet.Diagnostics.Windows from 0.13.7 to 0.13.8 by @dependabot in skwasjer#170
- chore(deps): Bump BenchmarkDotNet.Diagnostics.Windows from 0.13.8 to 0.13.9 by @dependabot in skwasjer#173
Full Changelog: https://github.com/skwasjer/IbanNet/compare/v5.11.0...5.12.0
- Generate regex pattern from IBAN pattern by @skwasjer in skwasjer#157
- Add a
RejectCountryRuleas the direct counterpart ofAcceptCountryRuleby @skwasjer in skwasjer#164
- Bump
BenchmarkDotNet.Diagnostics.Windowsfrom 0.13.6 to 0.13.7 by @dependabot in skwasjer#151 - Replace
MoqwithNSubstituteby @skwasjer in skwasjer#156 - Update IbanNet dependency in examples [skip ci] by @skwasjer in skwasjer#159
- Create FUNDING.yml [skip ci] by @skwasjer in skwasjer#160
- .NET Framework test builds fail with latest .NET SDK by @skwasjer in skwasjer#154
- Remove latest .NET SDK temporarily by @skwasjer in skwasjer#165
- Require approval on PR by @skwasjer in skwasjer#162
- PR decoration was broken by @skwasjer in skwasjer#167
- Fix warning "The property 'sonar.login' is deprecated" by @skwasjer in skwasjer#168
- Bump NodeJS/Java versions to fix deprecation warning of SonarScanner by @skwasjer in skwasjer#166
Full Changelog: https://github.com/skwasjer/IbanNet/compare/v5.10.0...v5.11.0
- Upgraded SWIFT registry provider to July '23 release 95, which adds Falkland Islands (FK).
- Upgraded Wikipedia registry provider, which adds North Macedonia (MK).
- #144 Add Catalan localization.
- In
IbanParserinternals, useReadOnlySpan<T>. - Add additional constructor overloads to
IbanValidator, in preparation of possible deprecation ofIbanValidatorOptions. Even if not deprecating, it is still convenient.
-
Upgraded SWIFT registry to April '23 release 94, which adds Mongolia (MN) and Nicaragua (NI).
- Importantly, the spec for Nicaragua seems to differ from what is listed on Wikipedia (28 vs 32 char length). The website of the Central Bank of Nicaragua confirms this.
- Additionally the included example for Nicaragua does NOT validate and I had to resort to patching the example data.
- the last updated timestamp of Georgia (GE) was also changed, because of an update to contact information in the spec (unused by IbanNet).
As with any new addition to the registry, some caution is advised and possibly changes are to be expected as I've seen such inaccuracies more often in the past.
-
Refactored pattern tokenizer to support wide tokens (multi char), next to (single) char tokens. This is an internal change that can unlock some extra future functionality.
-
Fix: the property
IbanRegistry.Providersis made read-only after hydrating/using the registry to prevent it from being modified.
- Upgraded SWIFT registry to Feb '23 release 93, which adds Somalia (SO) and fixes some misconfiguration for Finland (FI) removing the need for 'some' patching (no regression).
- Updated Wikipedia provider, which updates validation patterns for Dominican Republic (DO), Georgia (GE), Ireland (IE), Jordan (JO), Pakistan (PK), Palestinian territories (PS), Turkey (TR), British Virgin Islands (VG) and Burundi (BI).
- Update
FluentValidationto v11.3.0 - Updated Wikipedia registry provider which corrects the IBAN and BBAN pattern for Azerbaijan (AZ). The Swift registry (which is the default) was already correct, so there is no regression if you do not use the Wikipedia provider.
- #116 Added .NET 7 target framework support
- Performance improvements (10-20%):
- Use
CollectionsMarshal.AsSpanin some areas to improve enumeration perf - Use faster API's to change a
Span<char>back to astring - Use new .NET 7
charAPI's and aggressive inline owncharextensions - Rework
Patternlazy init to improve init time - When parsing, do not allocate and return a new copy of the input if no normalization was performed.
- Use
- Lazy initialization of
IbanRegistryis now thread safe. - Add ctor overload to
IbanGeneratorwhich enables specifying a seed for consistent, reproduceable generation. - Enable deterministic build/assemblies
- #97 Add Dutch localized exception/result messages.
- Move normalization to
IbanParserfromIbanValidator. This means that the validator is now validating 100% strict according to character pattern rules (character class, case and whitespace, etc.).ValidationResult.AttemptedValuewill now also have the raw input. Whitespace/casing is still ignored by theIbanParser. - Add Strict-property (default true) to
IbanAttributeandFluentIbanValidatorextension. When Strict=true, the input must strictly match the IBAN format rules. When Strict=false, whitespace is ignored and strict character casing enforcement is disabled (meaning, the user can input in lower and uppercase). This mode is a bit more forgiving when dealing with user-input. However it does require after successful validation, that you parse the user input withIbanParserto normalize/sanitize the input and to be able to format the IBAN in correct electronic format. - When normalizing, carriage return (CR) and line feed (LF) are no longer stripped.
IllegalCharactersResultandInvalidStructureResulthave a propertyPositionwhich indicates the 0-based position at which the first invalid character was encountered.- ~15-20% Performance improvements to pattern validator.
- Fix registration bug where if custom registry was registered, it would still additionally register IbanNet instead of ignoring.
- Regenerated Wikipedia registry which corrects IBAN pattern for Senegal (SN).
- Add code gen SWIFT CSV record patchers (so that this no longer requires manual work on each registry update)
- #78 Adds branch information to FR
- LTS: dropped support for .NET 5.0
- Updated System.ComponentModel.Annotations to v5.0.0
- Updated Autofac to 6.4.0
- Updated FluentValidation to 11.1.0
- Upgraded SWIFT registry to May '22 release 92, which adds Djibouti (DJ), fixes the bank pattern for Bahrain (BH).
- Upgraded Wikipedia registry which corrects English name for Sao Tome (ST).
- Fixed SWIFT country definitions for which the 'included country codes' contained inferred locales. The list now actually contains the expected country codes.
- LTS: dropped support for .NET 4.5.2 and .NET Standard 1.2/1.3. Added .NET 4.6.2.
- Use new
Chunk()LINQ API for .NET 6 and change ownPartition()method into polyfill for older framework targets. - Added
AcceptCountryRuleto restrict validation to a specific set of countries. The rule can be added via the validator options or dependency registration extensions.
- Change
masterbranch tomain, requiring update to CI scripts, and update all external page references.
- Add package README's
- Added .NET 6 target
- Added
IbanCountry.NativeNameproperty which returns the country name in native language, if available. - Changed the
IbanCountry.DisplayNameproperty to return the native name, if available; otherwise returns the English name. - Regenerated
WikipediaRegistryProviderto include Sudan (SD). - Implemented
IEquatable<T>. - Implemented
IFormattablewith format stringsE,PandOforElectronic,PrintandObfuscatedrespectively. - Upgraded registry to October '21 release 91 (added Burundi (BI) and updated Sudan (SD))
- Added JSON converter support for
System.Text.Jsonto theIbantype (>= .NET 5 only) - Added
iban.IsQrIban()extension method. A Swiss or Liechtenstein QR-IBAN must have a valid QR-IID, i.e. the bank number must be within the [30000, 31999] range.
- Removed deprecated contracts/code
IStructureValidationFactory,IStructureValidation,IStructureSection. Use thePatternabstraction for custom registry providers. - Removed
Iban.Parse,Iban.TryParse, use theIbanParserclass. - Added support for more countries based on Wikipedia.
- Removed
ValidationMethod, since performance in strict (= default) is now significantly faster (compared to v4.x, even in loose mode). The maintenance is not worth the little gains anymore. - Cleaned up API surface/sealed several types.
- Added
Country,Bban,BankIdentifierandBranchIdentifierproperties to theIbanvalue type. - Removed obsolete facade for
SwiftRegistryProvider. - Upgraded registry to June '21 release 90 (added Sudan (SD))
- Updated to FluentValidation v10.x, dropping .NET 4.6.1.
IIbanParserandIIbanGeneratorare now registered as singletons.- Added
IIbanRegistryas resolveable service (singleton).
- Moved
SwiftRegistryProviderto new namespace, kept facade for backwards compatibility. The facade will be removed in v5.0.
- Deprecate loose validation mode. Will be removed in v5.0.
IIbanRegistry.TryGetValuenow supports case insensitive country codes.
- #21 #31 Added
IbanGenerator. - LTS: change target frameworks .NET 4.5 and 4.7 to 4.5.2 and 4.7.2 respectively.
- Fix Iraq (IQ) and Finland (FI) patterns (does not affect validation outcome).
- Introduce pattern abstraction for registry which encapsulates a pattern string and tokenizer. Deprecates
IStructureValidationFactory, but keeps backwards compatible. Patterns are useful when implementing more/future providers to extend country support.
- Upgraded registry to March '21 release 89 (updated Andorra (AD) and El Salvador (SV))
- Added .NET 5.0 target framework support (benchmark).
- Update several nullable reference type code contracts.
- Updated to FluentValidation v9.x. This also means dropping support for .NETStandard 1.1/1.6 for FluentValidation integration.
- (breaking) Updated to Autofac v6.x (one Autofac interface changed)
- Upgraded registry to September '20 release 88 (added Libya (LY))
- Added
IbanBuilderandBbanBuildertypes.
- IBAN's are now always converted to upper case prior to validation.
- Replaced
Iban.ToString(string)withIban.ToString(IbanFormat), and added obfuscated format.
- #19 Parse should only allow non-nullable string.
- #23 AttemptedValue did not match actual value used in validation.
- #24 Structure test will ignore country code casing.
- Upgraded registry to May '20 release 87 (changes to ST)
- Added
IbanParserwhich provides equivalent non-static functionality toIban.ParseandIban.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
ICheckDigitsCalculatorabstraction. - Exposing
IIbanValidationRuleallowing custom validation rules. - Performance improvements
- (breaking)
Iban.ParseandIban.TryParseare obsolete, useIIbanParser. - (breaking) Added IbanValidator ctor overload accepting an
IbanValidatorOptionsclass, 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)
ValidationResultnow containsError-property containing the error that occurred. - (breaking) Remove deprecated TypeConverter facade.
- (breaking) Remove deprecated ctor (accepting
Lazy). - (breaking)
IbanValidator.SupportedCountriesnow is a dictionary, allowing look up by country code. - (breaking) Renamed
CountryInfotoIbanCountry. - (breaking) Renamed
ValidationResult.ValuetoValidationResult.AttemptedValue. - (breaking) Moved
BranchandBankproperties fromBbanStructuretoIbanCountryand all offsets are now relative to entire IBAN. This makes it easier to extract this data from an IBAN. - (breaking)
IbanAttributeno longer uses staticIban.Validatoras fallback since it is unclear it does so. TheIIbanValidatorwill now only be resolved from IoC container and as such if not registered an exception is thrown.
- backport: Upgraded registry to May '20 release 87 (changes to ST)
- Upgraded registry to Januari '20 release 85 (improves Egypt, not effective until 2021).
- Upgraded registry to October '19 release 84 (adds Egypt).
- Enabled SourceLink.
- Removed ability to apply
IbanAttributeto fields, since model validation does not occur for fields. - Improved continuous integration, added code coverage.
- Deprecated
IbanNet.IbanTypeConverter, replaced byIbanNet.TypeConverters.IbanTypeConverter. - Added IbanNet.FluentValidation package.
- Upgraded registry to April '19 release 83.
- Added extra target frameworks
.NET 4.7,.NET Standard 1.6and.NET Standard 2.0
- Partial rewrite to support the official Swift IBAN registry.
- Added support for 4 more countries for a total of 76.
- Added details through
CountryInfo, including IBAN, BBAN, bank and branch structure information, whether a country is a SEPA member and more. - (breaking) Replaced
IbanValidator.SupportedRegionswithIbanValidator.SupportedCountries. - (breaking) The
IIbanValidator.Validatemethod now returns aValidationResultobject, instead of an enum value, in order to provide more information of the validation.
- Added IbanNet.DataAnnotations for DataAnnotation support.
- (breaking) retarget from .NET Framework 4.5.2 to .NET 4.5.
- Added
TypeConvertersupport.
- Expose supported regions via
IbanValidator.SupportedRegions
- Convert to .NET Standard 1.2
- Initial release with support for 72 countries