Function getCountrySpecifications

  • Returns specifications for all countries, even those who are not members of IBAN registry. IBANRegistry field indicates if country is member of not.

    // Validating IBAN form field after user selects his country
    // <select id="countries">
    // ...
    // <option value="NL">Netherlands</option>
    // ...
    // </select>
    $("#countries").select(function() {
    // Find country
    let country = ibantools.getCountrySpecifications()[$(this).val()];
    // Add country code letters to IBAN form field
    $("input#iban").value($(this).val());
    // Add New value to "pattern" attribute to #iban input text field
    $("input#iban").attr("pattern", $(this).val() + "[0-9]{2}" + country.bban_regexp.slice(1).replace("$",""));
    });

    Returns CountryMap