Welcome Guest, Not a member yet? Register   Sign In
Form validation SET_RULES problem
#1

[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.


#2

[eluser]DimCI[/eluser]
All is OK, false alarm. Sorry.




Theme © iAndrew 2016 - Forum software by © MyBB