title: Laravel maatwebsite Import Error and Exception handling
body: <p>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</p>
  <pre><code>&lt;?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'=&gt;['email','unique:users,email']
  
          ];
      }
  
  
  
      public function collection(Collection $rows)
      {
          Validator::make($rows-&gt;toArray(), [
              '*.namess' =&gt; 'required',
              '*.email'=&gt;['email','unique:users,email'],
          ])-&gt;validate();
  
          foreach ($rows as $row)
          {     $this-&gt;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-&gt;Handlecategory($array);
  
  
              $nums = [];
              $selected=false;
              $correct_order = [];
              $maping = array();
              $this-&gt;count = count($row);
              $count = count($row);
              $map_array = array();
              $questions = [];
              $sheet=$this-&gt;sheet_name;
  
              $this-&gt;set_role(  $sheet );
  
                  $user = User::create([
  
  
                      'name' =&gt; $row['name'],
                      'first_name' =&gt; $row['first_name'],
                      'last_name' =&gt; $row['last_name'],
                      'email' =&gt; $row['email'],
                      'gender' =&gt; $row['gender'],
                      'date_of_birth' =&gt; $newformat,
  
                      'password' =&gt; $pass,
                      'password_confirmation' =&gt; 1,
  
  
                  ]);
  
                  $user-&gt;userCategory()-&gt;attach($cateable_array);
                  $user-&gt;syncRoles($this-&gt;role);
  
  
  
              if ($this-&gt;session_toggle==='true') {
              $this-&gt;SendEmailusers($user,$password);
  
             }
          }
      }
  </code></pre>
  <p>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</p>
  <pre><code> public function import_xlsx(Request $request)
      {
          $i = 0;
          $j = 0;
          $module_title = $this-&gt;module_title;
          $module_name = $this-&gt;module_name;
          $module_path = $this-&gt;module_path;
          $module_icon = $this-&gt;module_icon;
          $module_model = $this-&gt;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))-&gt;chain([
  
           new NotifyUserImportComplete(request()-&gt;user()),
       ]);
  
   }
   catch (\Exception $e){
       Log::info('exception');
  
   }
   catch ( ValidationException $e ){
  
    Log::info(&quot;fffffffffffffffffffffffffffffff&quot;);
   }
          Flash::success(&quot;&lt;i class='fas fa-check'&gt;&lt;/i&gt; &quot; .$msg)-&gt;important();
  
  
          return redirect(&quot;admin/$module_name&quot;);
      }
  </code></pre>