Skip to content

v5.7.0

Compare
Choose a tag to compare
@skwasjer skwasjer released this 09 Oct 20:11
· 188 commits to main since this release

What's Changed

  • Move normalization to IbanParser from IbanValidator. This means that the validator is now validating 100% strict according to character pattern rules (character class, case and whitespace, etc.). ValidationResult.AttemptedValue will now also have the raw input. Whitespace/casing is still ignored by the IbanParser. @skwasjer in #95 Note that some countries DO allow mixed character casing, don't assume all IBAN's are upper cased.
  • Add Strict-property (default true) to IbanAttribute and FluentIbanValidator extension. 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 with IbanParser to normalize/sanitize the input and to be able to format the IBAN in correct electronic format. @skwasjer in #95
  • When parsing, carriage return (CR) and line feed (LF) are no longer ignored and will cause parsing to fail.
  • IllegalCharactersResult and InvalidStructureResult have a property Position which indicates the 0-based position at which the first invalid character was encountered.
  • ~15-20% Performance improvements to pattern validator.

IbanNet.DependencyInjection.Autofac

  • Fix registration bug where if custom registry was registered, it would still additionally register IbanNet's built-in registry service instead of ignoring.

Full Changelog: v5.6.2...v5.7.0