[eluser]Tominator[/eluser]
Hello there!
I've got one question: Is there any way how to make just validation library?
I mean: We use form validation library, which works like this:
Code:
$this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]');
$this->form_validation->set_rules('password', 'Password', 'required|matches[passconf]');
I am looking for something, which will check local variables, like this:
Code:
$name = 'Peter';
$this->validation->set_rules('name', 'trim|required|min_length[5]|max_length[12]|xss_clean]');
if ($this->form_validation->run() == FALSE)
{
// we can continue here
}
Thanks for your help.
Tom.