Welcome Guest, Not a member yet? Register   Sign In
Validation Form

(This post was last modified: 05-08-2020, 04:16 AM by Bary.)

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);

and the error on update:
PHP Code:
The email field must contain a unique value.
The matricule field must contain a unique value
Thank you.  Smile

Messages In This Thread
Validation Form - by Bary - 05-08-2020, 12:53 AM
RE: Validation Form - by jreklund - 05-08-2020, 09:36 AM
RE: Validation Form - by Bary - 05-18-2020, 03:47 AM

Theme © iAndrew 2016 - Forum software by © MyBB