[eluser]DimCI[/eluser]
Hi, guys!
Have a problem with form validation when I try to use variables in set_rules:
e.g.
$this->form_validation->set_rules('fname', 'fname_label', 'some|validation|rules') // works, but...
if I try this:
$my_rules = 'a rule';
...code...
$my_rules .= '|one_more_rule';
...etc..
$this->form_validation->set_rules('fname', 'fname_label', $my_rules) // DOESN'T work!
Why?
Thank you.
P.S. The core is '|' parsing for sure because if $my_rules doesn't have this character (=one rule only) I have no problem.