2
I’m in a need I don’t know how to accomplish.
Well, my problem is:
I have a field is_unique which refers to two fields of my BD, the IDENTIFIER and the PLAN. I would like to know how to carry out this validation?
for a single field I use so:
$imeiRules = "required|min_length[3]|max_length[45]|xss_clean|strip_tags";
if($this->input->post('txtImei') != $this->input->post('imeiOld')){
$imeiRules .= " |is_unique[equipamento.equipamento_imei]";
}
I just can’t do it with two single fields.
Ever tried to make
"|is_unique[campo1]|is_unique[campo2]"
?– Wallace Maxters
Worse than ever... and nothing.
– Adriano Sousa
See this answer http://stackoverflow.com/questions/14575165/validation-unique-field-in-codeigniter-with-2-index
– Wallace Maxters
Thank you, now I understand how to perform the validation.
– Adriano Sousa