Page 1 of 1

Validation Banknumber field

Posted: 2022-08-26 09:04
by RonP
Hi,
Is there a way to check the validation of a given Banknumber ?
In Europe the bank have numbers based on the so called IBAN notification and verification.
I've found PHP code for checking that but can’t find out, lack of knowledge, of that code is secure/outdated/ right statements for "current” PHP version.
So if it is possible I would ask for a standard implementation for this IBAN check.
Hereby the link to the found PHP-code: https://gist.github.com/cryptexvinci/fc ... n-iban-php
Ron

Re: Validation Banknumber field

Posted: 2022-08-26 09:56
by jsetzer
try putting the function

checkIBAN($iban)

in header-extras.php and then call it in _before_insert and _before_update hook. pass $data['YOUR_FIELDNAME']

Cancel insert/update depending on the return value.

Re: Validation Banknumber field

Posted: 2022-08-26 10:28
by RonP
Jsetzer, Thank youfor the fast suggestion .

I'll try to place it in the right way in the mentioned files.

Ron