I am trying to write a java program that verifies the validity of a bank account number in Algeria, and I was checking the web for formula, and I found a piece of javascript (that I could not understand).
Here is the code:
function validateFormRIB() {
var x = document.forms["formrib"]["rib"].value;
if ((!/^\d+$/.test(x))||(x.length!=20)) {
alert("Le RIB doit comporter exactement 20 caractères numériques");
return false;
}
}
My question is what is the formula used for the computation?
Here is the link to the web page : http://www.babalweb.net/finance/verificateur-rib-releve-identite-bancaire-algerie.php