IBAN: Difference between revisions

(Nimrod -> Nim)
Line 539:
int lengthForCountryCode;
 
var countryCodeKnown = _lengthsLengths.TryGetValue(countryCode, out lengthForCountryCode);
if (!countryCodeKnown)
{
Line 555:
var newIban = value.Substring(4) + value.Substring(0, 4);
 
newIban = Regex.Replace(newIban, @"\D", match => ((int) match.Value[0] - 55).ToString());
 
var remainder = BigInteger.Parse(newIban) % 97;
Line 561:
if (remainder != 1)
return ValidationResult.ValueFailsModule97Check;
 
 
return ValidationResult.IsValid;
Line 576 ⟶ 575:
}
 
private static Dictionaryreadonly IDictionary<string, int> _lengthsLengths = new Dictionary<string, int>
{
{"AL", 28},
Anonymous user