CodeIgniter Forums
Tapping into form_validation - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Tapping into form_validation (/thread-20134.html)



Tapping into form_validation - El Forum - 06-29-2009

[eluser]tdktank59[/eluser]
Alright so I'm working on a auth library however i would like to tap into the form_validation library
However I have no idea where to start even looking for how to do this?


Tapping into form_validation - El Forum - 06-29-2009

[eluser]TheFuzzy0ne[/eluser]
Can you be a bit more specific about what you want to do?


Tapping into form_validation - El Forum - 06-29-2009

[eluser]Colin Williams[/eluser]
Code:
$this->load->library('form_validation');

I also found a ton of info at http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html


Tapping into form_validation - El Forum - 06-29-2009

[eluser]tdktank59[/eluser]
Thanks, Colin

TheFuzzyOne
Basically I want to tie into it so I can set rules for validation to run on my database when I save stuff (kinda like datamapper does)


Tapping into form_validation - El Forum - 06-29-2009

[eluser]TheFuzzy0ne[/eluser]
If you want to use the form validation library for anything other than validating forms, I think you're going to run into problems. It would be about as useful as a wheel chair with pedals. Is it user input you want to validate, or programmer input?


Tapping into form_validation - El Forum - 06-29-2009

[eluser]tdktank59[/eluser]
Just the rules basically.
I found how DataMapper uses it so ill hack that up and use its methods...