title: Laravel file validation after submitting form via jquery submit();
body: <p>When i try to validate a image file after submitting the form via jquery </p>
  
  <pre><code>$('#logo').submit(); 
  </code></pre>
  
  <p>am always getting the validation error as </p>
  
  <pre><code>The img field is required
  </code></pre>
  
  <p>Here is the validation that i used for validating the file</p>
  
  <pre><code>$input = array('img' =&gt; Input::file('img'));
  $rules = array(
          'img' =&gt; 'required',
  );
  // Now pass the input and rules into the validator
  $validator = Validator::make($input, $rules);
  
  // check if the validator failed -----------------------
  if ($validator-&gt;fails()) {
      // get the error messages from the validator
      $messages = $validator-&gt;messages();
      // redirect our user back to the form with the errors from the validator
      print_r($messages);
  }
  </code></pre>
  
  <p>I failed to identify what is the problem with the script,
  Help me to overcome the issue.
  Thanks in advance.</p>