Created
September 6, 2017 03:14
-
-
Save ibnuh/6e9f78b013e568e8c1d721e052c85073 to your computer and use it in GitHub Desktop.
Codeigniter is unique form edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($this->input->post('fieldname') != $original_value) { | |
$is_unique = '|is_unique[table.row_name]' | |
} else { | |
$is_unique = '' | |
} | |
$this->form_validation->set_rules('fieldname', 'Field Name', 'required|trim|xss_clean'.$is_unique); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment