title: Concatenate using javascript into validation error message
body: <p>I´m trying to concatenate error messages from javascript validation, i have the updateErrorMessage wich receives just one message and display the modal (with just one message per time): </p>
  
  <p>How can i concatenate all error messages to display all them at once into the modal window?</p>
  
  <pre><code>function updateErrorMessage(msg) {
      var errorMessage = msg;
      var modal = document.querySelector('.modal-wrap');
      document.getElementById('close').onclick = function() {
          removeClass(modal, 'md-active');
      }
  
      document.getElementById('modalErrormessage').innerHTML = errorMessage;
      addClass(modal, 'md-active');
  }
  </code></pre>
  
  <p>EDIT: I do capture the error message this way:</p>
  
  <pre><code>if (Protocol != '' &amp;&amp; Protocol.length &lt; 11) {
      formatErrorMessage('wrong protocol');
      updateErrorMessage('Please! correct protocol.');
      e.preventDefault(e);
      e.stopPropagation(e);
  }
  </code></pre>
  
  <p>I try to use push but I do get undefined error message:</p>
  
  <pre><code>EDIT: 
  function formatErrorMessage(msg){
      var errorMessage = msg;
      var textMsg = [];
      textMsg.push(errorMessage);
      var finalErrorMessage;
      mensagemErroFinal = textMsg.join(', ');
      return mensagemErroFinal;
  
  }
  </code></pre>