Welcome Guest, Not a member yet? Register   Sign In
File uploading and validation error!
#1
Lightbulb 
(This post was last modified: 07-09-2020, 05:14 AM by dimitrisgan97.)

Hello,

Im trying to validate a file (image) along with other data and for some reason a i get the following exception when i dd() CodeIgniter\HTTP\RedirectResponse.

If i do not include the file validation everything is working fine..

Does anyone have any clue that may help?

Also any other idea (without need to change redirect())...?


Thanks!

Screenshots:

https://ibb.co/2vV7tdV
https://ibb.co/N12dfbP


Controller:

PHP Code:
$rules = [
  'email' => [
    'rules' => 'required|valid_email|max_length[255]|is_unique[users.email]',
    'label' => 'Email Address',
  ],
  ...
  ...
 
'face_photo' => 'max_size[face_photo,1024]' //If i delete this row everything is fine!
];

if (!
$this->validate($rules)) {
  //Something is happening with RedirectRespone.
  // Validator has set the error for the face_photo fine.
  //Also withInput() & with() are not working

  return redirect()->back()->withInput()->with('validation'$this->validator); 

Reply




Theme © iAndrew 2016 - Forum software by © MyBB