0
votes

I am trying to validate a iban no for germany, but I cannot get pregMatch to work with formhandler. I cannot find a mistake and compared it with the formhandler documentation, but nothing helped. Maybe somebody has a hint for me. This is my code:


    debitiban.errorCheck {
        1 = pregMatch
        1.value = ^DE\d{2}\s?([0-9a-zA-Z]{4}\s?){4}[0-9a-zA-Z]{2}$
    }

1

1 Answers

0
votes

The value is directly passed on to PHPs preg_match function, so it has to be a valid PCRE regex pattern. You are missing a delimiter charater in your expression. Try to surround the expression by slashes:

debitiban.errorCheck {
    1 = pregMatch
    1.value = /^DE\d{2}\s?([0-9a-zA-Z]{4}\s?){4}[0-9a-zA-Z]{2}$/
}