title: onchange jquery validation for file type
body: <p>Here is my <a href="http://jsfiddle.net/c9sbmdv5/" rel="nofollow">Fiddle</a></p>
  
  <p>What i have is to display the image name near the upload text in the onchange event. </p>
  
  <p>Here i need to have the validation on the onchange and it should display the error along with the file name</p>
  
  <p>Here is what i have tried.</p>
  
  <pre><code>Upload&lt;input type="file" onchange=" document.getElementById('spanFileName').innerHTML = this.value;" style="display:block;margin-top: -20px;opacity: 0;" &gt;
  </code></pre>
  
  <p>Note :</p>
  
  <p>I don't want to do the validation in a seperate by setting rules, i want to do it in onchange, but it will be ok if i have the script inside the input type file code</p>
  
  <p>Update : It will be better if i have the file name to be displayed and hide in 5 seconds, as i don't know to write script inside the input type file code</p>
  
  <p>How can i do this, Help please</p>