|
$this->form_validation->set_rules('username', 'Username', 'callback_username_check');
function username_check($str)
{
$this->form_validation->set_message('username_check', 'The %s field can not be the word "test"');
return FALSE;
}
这段代码是不是只能在控制器里执行username_check, 如果在类里面就不能执行username_check了 |
|