validation - Update database with populated Form using Codeigniter -
i managed retrieve user's data database , populate form future updates. view in place , data loaded on fields, have update button calls controller validation. apparently, form_validation->run() returning false. below view, same name , last name:
// //email // $data_email= array( 'name' => 'email', 'placeholder' => '', 'value' => $account->email, 'class' => 'span12', 'rules' => 'required', 'style'=> 'font-size:18px;'); $email = array('class' => '', 'style' => 'font-weight:bold;'); echo form_label('email: ','email', $email); echo form_input($data_email); // //end of email // below controller
$this->form_validation->set_rules('fname', 'first name', 'required|trim|xss_clean'); $this->form_validation->set_rules('lname', 'last name', 'required|trim|xss_clean'); $this->form_validation->set_rules('email', 'email','required|trim|xss_clean|valid_email|is_unique[accounts.email]|is_unique[temp_accounts.email]'); at point form_validation->run() returns false, unable validate data form. suggestions appreciated.
i'm not sure since description isn't clear, try removing is_unique rules validation rules?
i'm guessing code checking if email in accounts table, , if view being populated database.
Comments
Post a Comment