is_unique for codeigniter form validation

前端 未结 9 1076
走了就别回头了
走了就别回头了 2020-12-03 07:19

I\'m trying to figure out how I can use the is_unique rule from the Codeigniter form validation library in the following situation.

I\'m trying to submi

9条回答
  •  爱一瞬间的悲伤
    2020-12-03 08:00

    $something = $this->input->post('something');
    
    $this->form->validation->set_rules('something','Something','xss_clean|is_unique['tbl'.users]');
    
    if($this->form_validation->run()== FALSE){
    
    }
    

提交回复
热议问题