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

[eluser]Unknown[/eluser]
When I use form validation like,
Code:
$this->form_validation->set_rules('title', 'title', 'required|trim|strip_tags');
The required part works, but trim or strip_tags do not (the php native functions)

Why?

#2

[eluser]ivantcholakov[/eluser]
I would propose another order:

Code:
$this->form_validation->set_rules('title', 'title', 'strip_tags|trim|required');
#3

[eluser]Unknown[/eluser]
no.
Code:
$this->form_validation->set_rules('title', 'title', 'trim|strip_tags');
does not work
#4

[eluser]InsiteFX[/eluser]
strop_tags is not a form_validation rule see the rule reference in the Users Guide.
#5

[eluser]Narf[/eluser]
There's a bug in CI 2.1.x that prevents using native PHP functions as rules. Try upgrading to 3.0-dev.
#6

[eluser]Jeroma[/eluser]
This is good !
____________
http://www.reductan.com




Theme © iAndrew 2016 - Forum software by © MyBB