📅  最后修改于: 2022-03-11 14:58:32.097000             🧑  作者: Mango
public function signup_validation()
{
$this ->load->library('form_validation');
$this->form_validation->set_rules('username', 'Username', 'required|trim|is_unique[userinfo.username]|strtolower');
$this->form_validation->set_rules('password', 'Password', 'required|trim');
$this->form_validation->set_rules('cpassword', 'Confirm Password', 'required|trim|matches[password]');
$this->form_validation->set_message('is_unique', 'That Username Already Exists.');
if($this->form_validation->run()){
}else{
$this->load->view('signup');
}
}