Hi,
I have a problem with the validation of the form. that it is an insertion, it works but for the modification, it does not work. here is the code for the model
controllers:
and the error on update:
Thank you.
I have a problem with the validation of the form. that it is an insertion, it works but for the modification, it does not work. here is the code for the model
PHP Code:
'email' => 'required|valid_email|is_unique[employee.email,employee_id,{employee_id}]',
'matricule' => 'required|is_natural|is_unique[employee.matricule,employee_id,{employee_id}]',
PHP Code:
if($emp->validate($this->request->getPost()) === FALSE) {
$msg = $emp->errors();
return redirect()->to(site_url('form'))->with('errors',$msg);
}else{
$emp->save($this->request->getPost());
}
PHP Code:
The email field must contain a unique value.
The matricule field must contain a unique value.
