![]() |
Only validation library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Only validation library (/showthread.php?tid=31021) |
Only validation library - El Forum - 06-03-2010 [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]'); I am looking for something, which will check local variables, like this: Code: $name = 'Peter'; Thanks for your help. Tom. Only validation library - El Forum - 06-03-2010 [eluser]steelaz[/eluser] AFAIK Validation library reads POST array, so if you set Code: $_POST['name'] = 'Peter'; Only validation library - El Forum - 06-03-2010 [eluser]Tominator[/eluser] Thank you steelaz for you answer, but you probably don't understand me. Now I have to write somethink like this: Code: function Example($array) It would be nice to have validation class, providing support for local variables (not just POST) Only validation library - El Forum - 06-03-2010 [eluser]steelaz[/eluser] I understand, but can you try doing this: Code: function Example($array) Only validation library - El Forum - 06-03-2010 [eluser]Tominator[/eluser] Oh, I understand ![]() Thanks for help! |