Skip to Content Skip to Menu

Field validation - IBAN BIC - Perl regular expression - help and tips?

10 years 6 months ago - 10 years 6 months ago #243640 by pepperstreet
Hello, i wanted to add a custom validation to a text field. I tried different sample expressions… with no success. I also tried server side and browser-too option. Do i miss something obvious or is it a bug?

The "only-numbers" sample from tooltip works:
/^[0-9]*$/

But i can´t manage to run a check for IBAN or BIC bank numbers. I found misc regex snippets on the web. Any clue or help?

Example snippets .

Thanks in advance.


EDIT:
Does it work like this? I am going to try an example from mentioned URL. All IBAN check:
[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}

Then I have to enter it with this prefix/suffix, right?:
/^[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}*$/
Last edit: 10 years 6 months ago by pepperstreet.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum