title: how to validate email addreess on CSV file :: laravel
body: <p>I'm using an csv file to upload students email address to db using laravel.
  CSV file contains one column named 'email' to list emails. I want to add a validation to check whther all emails are in correct format or not. 
  correct email address format should be @uni.com  </p>
  
  <p>please advice</p>
  
  <pre><code>    $path = Input::file('import_file')-&gt;getRealPath();
                  $data = Excel::load($path, function ($reader) {
                  })-&gt;get();
  
  if (!empty($data) &amp;&amp; $data-&gt;count() &amp;&amp; !empty($data1) &amp;&amp; $data1-&gt;count() ) {
                  foreach ($data as $key =&gt; $value) {
                          $insert[] = ['email' =&gt; $value-&gt;email]; }
  
   if (!empty($insert)) {
                      DB::table('users')-&gt;insert($insert);
                  }
  </code></pre>
  
  <p>I'm using laravel maatwebsite/excel plugin</p>