Welcome Guest, Not a member yet? Register   Sign In
Found a bug in form validation with regex_match

I found a bug when I try to use regex_match like this:

'rules' => 'required|regex_match[[A|B]]'

if I use only [AB] instead of [A|B], regex_match function works properly,

but when I try to use [A|B], the CI_Form_validation class works wrong.

I found it caused by the seperator '|'.

How can I report this bug?


In the CI repo on github. But, how do you propose they fix it? They have to use some character for the rules separator, and no matter what character they use it will probably mess up someone's regex. You can always use a callback, or extend the form validation with your own custom rules to bypass that edge case you came across.

Theme © iAndrew 2016 - Forum software by © MyBB