Validation Banknumber field

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
User avatar
RonP
Veteran Member
Posts: 219
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Validation Banknumber field

Post by RonP » 2022-08-26 09:04

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

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Validation Banknumber field

Post by jsetzer » 2022-08-26 09:56

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.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
RonP
Veteran Member
Posts: 219
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Validation Banknumber field

Post by RonP » 2022-08-26 10:28

Jsetzer, Thank youfor the fast suggestion .

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

Ron

Post Reply