title: How to validate a form used for upload multiple images, in javascript
body: <p>I have code to validate my file upload form: 
  But it seems not working properly. 
  Any help: </p>
  
  <pre><code>&lt;script&gt;
  function validateForm()
  {
  var x=document.forms["myForm"]["file"].value;
  if (x==null || x=="")
  
  
  {
  alert("You must select an Image or Images");
  return false;
  }
  }
  &lt;/script&gt;
  &lt;form action="#" method="POST" enctype="multipart/form-data" name="myForm" onsubmit="return validateForm()"&gt;
  &lt;input type="file" name="files[]" multiple/&gt;
  &lt;input type="submit"/&gt;
  &lt;/form&gt;
  </code></pre>