CodeIgniter / PHPCheck when edit if the field is not duplicate Entry February 17, 2018 Chandan SharmaComment on Check when edit if the field is not duplicate Entryif($this->input->post(‘user_name’) != $original_value) { $is_unique = ‘|is_unique[users.user_name]’ } else { $is_unique = ” }$this->form_validation->set_rules(‘user_name’, ‘User Name’, ‘required|trim|xss_clean’.$is_unique);Share this:FacebookX