• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File uploading and validation error!

#1
Lightbulb 
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.