skwasjer / IbanNet

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

AttemptedValue does not match actual value used in validation #23

Closed Hoffs closed 3 years ago

Hoffs commented 4 years ago

Basically when validation is attempted it "normalizes" the input and uses that in validation context. But then it creates validation result and uppercases it there, thus AttemptedValue is not equals to normalizedIban. Reference: https://github.com/skwasjer/IbanNet/blob/39f9b9adf2b5158903d1a738ee4f4f6cc2372a85/src/IbanNet/IbanValidator.cs#L84-L91

skwasjer commented 4 years ago

True. The intent of 'attempted' value was to produce a consistent sanitized/normalized form for the IBAN (upper case) and was originally called just Value. But after the rename (v3->v4) this is not accurate as you describe and should already be covered by the IbanParser and Iban type which also do this. It warrants a minor version bump though.