I am trying to use maatwebsite in order to import excel file in my system , I am using Collection with queue to do that import as I have relation with another table, the import is working but I can not get the errors if they occurred this is my import model code
<?php
namespace App\Models;
use Maatwebsite\Excel\Concerns\RegistersEventListeners;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\WithEvents;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Maatwebsite\Excel\Events\BeforeSheet;
use Modules\UserCategory\Entities\UserCategory;
use Maatwebsite\Excel\Concerns\ToCollection;
use Illuminate\Support\Facades\Validator;
use Maatwebsite\Excel\Concerns\Importable;
use Maatwebsite\Excel\Concerns\WithValidation;
use Maatwebsite\Excel\Concerns\WithChunkReading;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Notifications\ImportHasFailedNotification;
use Hash;
use Log;
use Mail;
use Session;
class Import_Users implements ToCollection, WithHeadingRow, WithEvents,WithValidation,WithChunkReading,ShouldQueue
{
    use RegistersEventListeners,Importable;
public function rules(): array
    {
        return [
         '*.email'=>['email','unique:users,email']
        ];
    }
    public function collection(Collection $rows)
    {
        Validator::make($rows->toArray(), [
            '*.namess' => 'required',
            '*.email'=>['email','unique:users,email'],
        ])->validate();
        foreach ($rows as $row)
        {     $this->validationFields($row);
            $password = rand(11111111, 99999999);
            $pass=Hash::make($password);
            $time = strtotime($row['date_of_birth']);
           $newformat = date('Y-m-d', $time);
            if(isset($row['user_categories']))
                $Cates=$row['user_categories'];
            else
                $Cates='';
            $array = explode(',', $Cates);
            $cateable_array=$this->Handlecategory($array);
            $nums = [];
            $selected=false;
            $correct_order = [];
            $maping = array();
            $this->count = count($row);
            $count = count($row);
            $map_array = array();
            $questions = [];
            $sheet=$this->sheet_name;
            $this->set_role(  $sheet );
                $user = User::create([
                    'name' => $row['name'],
                    'first_name' => $row['first_name'],
                    'last_name' => $row['last_name'],
                    'email' => $row['email'],
                    'gender' => $row['gender'],
                    'date_of_birth' => $newformat,
                    'password' => $pass,
                    'password_confirmation' => 1,
                ]);
                $user->userCategory()->attach($cateable_array);
                $user->syncRoles($this->role);
            if ($this->session_toggle==='true') {
            $this->SendEmailusers($user,$password);
           }
        }
    }
I am using validation but the validation seems not working and not give me any error . this is how I call the import class in my controller
 public function import_xlsx(Request $request)
    {
        $i = 0;
        $j = 0;
        $module_title = $this->module_title;
        $module_name = $this->module_name;
        $module_path = $this->module_path;
        $module_icon = $this->module_icon;
        $module_model = $this->module_model;
        $module_action = 'import Excel';
        $module_name_singular = Str::singular($module_name);
        $import_file = Session::get('Excel_file_users');
        $send_mail_toggle = Session::get('Import_user_send_email');
        $data = [];
        $import = new Import_Users();
        $msg = 'Users Added To the Queue ,will inform You when it finish ';
        // $import_file= '/upload/Import/sheet.xls';
        Log::info('session from controller' . $send_mail_toggle);
 try {
     $result = Excel::import($import, storage_path($import_file))->chain([
         new NotifyUserImportComplete(request()->user()),
     ]);
 }
 catch (\Exception $e){
     Log::info('exception');
 }
 catch ( ValidationException $e ){
  Log::info("fffffffffffffffffffffffffffffff");
 }
        Flash::success("<i class='fas fa-check'></i> " .$msg)->important();
        return redirect("admin/$module_name");
    }
 
                        
You should be logging the error and/or flashing it in session like you do the success message