Skip to content

Instantly share code, notes, and snippets.

View krypton's full-sized avatar

Tiago Dias krypton

View GitHub Profile
@krypton
krypton / ibanvalidator.js
Created May 8, 2013 14:44
Javascript IBAN (International Bank Account Number) Validation
function validateIBAN(iban) {
var newIban = iban.toUpperCase(),
modulo = function (divident, divisor) {
var cDivident = '';
var cRest = '';
for (var i in divident ) {
var cChar = divident[i];
var cOperator = cRest + '' + cDivident + '' + cChar;