title: Js validate multipe input fields with same name
body: <p>Ok i have multy fields with same name, and i want to check is all fields are not empty. My code works if i have only one input, but i have no idea how to do that with more inputs</p>
  
  <pre><code>&lt;input class = "new_input" type=text name="name[]"/&gt;
  &lt;input class = "new_input" type=text name="name[]"/&gt;
  
  function validation(){
  
      var x = document.forms["form"]["name"].value;
      if(x ==='')
      {
         $("#warning").html("Morate uneti vrednost!").css('color','red');
      return false;
      }
      else
      {
          return true;
      }
  
  }
  </code></pre>
  
  <p>for example if enter only one field, validation will work, and i want to check all fields</p>