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

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


Messages In This Thread
Only validation library - by El Forum - 06-03-2010, 10:38 AM
Only validation library - by El Forum - 06-03-2010, 11:35 AM
Only validation library - by El Forum - 06-03-2010, 12:05 PM
Only validation library - by El Forum - 06-03-2010, 01:47 PM
Only validation library - by El Forum - 06-03-2010, 02:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB