07-14-2009, 04:58 AM
[eluser]timaksu[/eluser]
so we can use custom functions as part of the validation of a form. awesome. however, i have one issue with it. what if my validation function is, say, in a model that i've loaded. (say i've loaded the "user_model" model into my current controller. the user model has all the functions necessary to add/load/edit/etc website users. one of its features are to check if a member exists. i can call this normally by doing:
but how would i add that function ("exists") as a validation rule?
so we can use custom functions as part of the validation of a form. awesome. however, i have one issue with it. what if my validation function is, say, in a model that i've loaded. (say i've loaded the "user_model" model into my current controller. the user model has all the functions necessary to add/load/edit/etc website users. one of its features are to check if a member exists. i can call this normally by doing:
Code:
$this->user_model->exists($str);
but how would i add that function ("exists") as a validation rule?
