Welcome Guest, Not a member yet? Register   Sign In
show error for validation multiple images
#1

(This post was last modified: 01-26-2022, 11:09 AM by eleumas.)

I would like validate multiple images.
I have this code but i have some problem for show the errors ($this->validator->getErrors())
Someone can help me please? Smile
PHP Code:
$validationRule = ([
        'images' => [
          'uploaded[images]',
          'is_image[images]',
          'mime_in[images,image/jpg,image/jpeg,image/gif,image/png]',
          'max_size[images,4096]',
          'max_dims[images,1920,1080]',
        ],
      ]);

      if (! $this->validate($validationRule))
      {
        return redirect()->to(base_url('cck/articles'))->with('danger'''.$this->validator->getErrors());
      
Reply
#2

What's your problem?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB