title: Laravel : file validation issues
body: <p>I'm having issues validating files with Laravel 3. Whatever I try, the validator passes. So uploading a mp4 when it should not be allowed works.. I know I'm not too far away, but I can't figure it out.</p>
  
  <p>Here is the relevant part of my function my form is posting :</p>
  
  <pre><code>public function post_edit($id)
  {
      $input = Input::all();
      $files = Input::file();
  
      $dev = new Dev();
      $upload = new Upload();
  
      $v_upload = Validator::make($files, $upload-&gt;rules);
      $v_dev = Validator::make($input, $dev-&gt;rules);
      if($v_dev-&gt;passes() &amp;&amp; $v_upload-&gt;passes()) {
          //success
  
          $dev = Dev::find($id);
          //save input data to model then save...
          $dev-&gt;save();
  
          foreach($files as $key=&gt;$file) {
              if($file['name'] != '') {
                  $upload = new Upload;
                  $upload-&gt;for = 'devs';
                  $upload-&gt;for_id = $id;
                  $upload-&gt;name = $file['name'];
                  $upload-&gt;type = $file['type'];
                  $upload-&gt;save();
                  Input::upload($key, 'public/upload', 'd'.$id.'_'.$file['name']);
              }
          }
  
          $message = "Success!";
  
          return Redirect::to('/dev/'.$id)-&gt;with('message', $message);
      }
      else {
          //failure
          dd($v_upload);
      }
  }
  </code></pre>
  
  <p>And my model :</p>
  
  <pre><code>class Upload extends Eloquent
  {
      public static $table = 'uploads';
      public static $timestamps = false;
  
      public $rules = array(
          'size' =&gt; 'max:102400',
          'type' =&gt; 'mimes:png,jpg,gif,tiff,zip,tgz,css,html,js,php,txt,mp3,psd,csv,xls,xlsx,ppt,doc,docx'
      );
  }
  </code></pre>
  
  <p>Also, my array of files (<code>Input::file()</code>) looks like this:</p>
  
  <pre><code>array(2) {
    ["upload1"]=&gt;
    array(5) {
      ["name"]=&gt;
      string(17) "facebook-logo.jpg"
      ["type"]=&gt;
      string(10) "image/jpeg"
      ["tmp_name"]=&gt;
      string(14) "/tmp/phpEGqXWT"
      ["error"]=&gt;
      int(0)
      ["size"]=&gt;
      int(12939)
    }
    ["upload2"]=&gt;
    array(5) {
      ["name"]=&gt;
      string(15) "mobile-icon.jpg"
      ["type"]=&gt;
      string(10) "image/jpeg"
      ["tmp_name"]=&gt;
      string(14) "/tmp/phpygDS1k"
      ["error"]=&gt;
      int(0)
      ["size"]=&gt;
      int(8570)
    }
  }
  </code></pre>