Check when edit if the field is not duplicate Entry
if($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);
No comments:
Post a Comment