VB.NET IBAN validator
- Copy the class iban.vb into your App_Code folder in your project
- Call the function from the namespace using
iban.cIban.ValidateIBAN("<YOUR_IBAN_NUMBER>")
Dim iban_check As Integer = iban.cIban.ValidateIBAN("BE68539007547034")
if check_iban = 0 then
' IBAN is valid
else
' IBAN is not valid
end if
0 = ok, IBAN is valid
1 = Country code unknow, mod97 check is ok
2 = Length invalid with country code
3 = Mod97 check failed
4 = Format not recognized
Adding this namespace to your web.config like:
<system.web>
<pages>
<namespaces>
<clear />
<add namespace="iban.cIban" />
</namespaces>
</pages>
</system.web>
Now you can access the function directly:
Dim iban_check As Integer = ValidateIBAN("BE68539007547034")