01-09-2015, 12:45 PM
@dbui
I use the same approach, a callback wrapper within the controller with a tiny difference (tried on CI3):
In my code it would be:
And:
would be:
Ugly a little bit, but this prefixed with "_" callback rule can not be called by the router.
I use the same approach, a callback wrapper within the controller with a tiny difference (tried on CI3):
Code:
$this->form_validation->set_rules('email', "email",'callback_validate_user');
In my code it would be:
Code:
$this->form_validation->set_rules('email', "email",'callback__validate_user');
And:
Code:
public function validate_user($str) {
would be:
Code:
public function _validate_user($str) {
Ugly a little bit, but this prefixed with "_" callback rule can not be called by the router.