Mod 97

By |2020-12-16T09:27:06+01:004th July 2013|Backend, Full Stack, Software Engineering|0 Comments

For my current project we need to validate IBAN numbers. IBAN numbers are validated with an ISO 7064 mod-97-10 calculation where the remainder must equal 1 static public bool Validate(string iban) { // pre-conditions if ( string.IsNullOrEmpty( iban ) || (!Regex.IsMatch(iban, "^[A-Z0-9]") ) ) { return false; } // clean-up IBAN iban = iban.Replace(" ", [...]