v5.7.0
What's Changed
- Move normalization to
IbanParser
fromIbanValidator
. 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 theIbanParser
. @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
andFluentIbanValidator
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 withIbanParser
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
andInvalidStructureResult
have a propertyPosition
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