欢迎各位兄弟 发布技术文章
这里的技术是共享的
{ $this->load->library('form_validation'); $this->form_validation->set_rules('password', "<span class='error'>密码</span>", 'required|min_length[6]|regex_match[/^(?!\d+$)[\da-zA-Z]*$/]|trim'); $this->form_validation->set_rules('repassword', "<span class='error'>确认密码</span>", 'required|matches[password]'); if ($this->form_validation->run() == FALSE) { $this->load->view('admin/users/modify', $this->_data); return ; } $this->load->view('admin/users/modify', $this->_data); }