anghelvalentin / CountryValidator

C# Validations for Social Security Numbers, VAT Codes and tax identification numbers
https://randommer.io/SocialNumber/VatValidator
36 stars 20 forks source link

Fix IcelandValidator TaxCode validation error #12

Closed LordSuprachris closed 1 month ago

LordSuprachris commented 2 years ago

Hi. The test "sum == value[8]" always returns false as it's a comparison between integer and char, thus the function always returns ValidationResult.InvalidChecksum(). Adding a parsing to integer on value[8] resolves the problem.