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

Stack overflow on VATIN verification #1

Closed robinroyer closed 4 years ago

robinroyer commented 4 years ago
foreach (var supportedCountry in CountryValidation.CountryValidator.SupportedCountries)
{
    var countryEnum = Enum.Parse<CountryValidation.Country>(supportedCountry);
    var result = validator.ValidateVAT("K7399859412", countryEnum);
    if (result.IsValid)
    {
        return true;
    }
}
robinroyer commented 4 years ago

see https://github.com/anghelvalentin/CountryValidator/blob/master/CountryValidator/CountriesValidators/AndorraValidator.cs#L21 and https://github.com/anghelvalentin/CountryValidator/blob/master/CountryValidator/CountriesValidators/AndorraValidator.cs#L71 for the overflow

anghelvalentin commented 4 years ago

Many thanks 👍 I solved the issue