title: Laravel4: Validation on file entry
body: <p>I have in my app a simple form to upload photo.</p>
  
  <p>There are three fields: title - caption - and the button for choosing the file.
  Right now the validation check if the title is required.
  The caption is not required and is ok.</p>
  
  <p>But i do not know how can i deal with validation regarding files.</p>
  
  <p>If no file is inserted, i get the laravel error message: Call to a member function move() on a non-object.
  Instead i would like just a validation error.
  And how can i required that only images are entered?
  Right now is possible to upload even word documents..</p>
  
  <p>There are the rules as they are now. In the Photo model:</p>
  
  <pre><code>class Photo extends Eloquent {
  protected $guarded = array();
  
  public static $rules = array('title' =&gt; 'required');
  }
  </code></pre>
  
  <p>Thank you!</p>