) 

I am trying to validate a form using Javascript, i would like the span to update when the string length is a certain amount of characters

```
    <form id="contact">
      <input id="name" name="name" type="text" class="feedback-input" placeholder="Name"/> <span id="spanName"> </span>
      <input name="email" type="text" class="feedback-input" placeholder="Email" />
      <textarea name="text" class="feedback-input" placeholder="Message..."></textarea>
      <input type="submit" value="SUBMIT"/>
    </form>

    window.onload = function () { 
      var name = document.getElementById("name");
      var nameVal = name.value;
      var spanName = document.getElementById("spanName");
      spanName.innerHTML = "&#10007;";

      name.addEventListener('keydown', function () {
        validate();
      });

      function validate() {
        console.log(name);
        console.log(nameVal);
         if (nameVal.length > 0) {
            spanName.innerHTML = "&#10004;";
         } else if (nameVal.length > 8) {
            spanName.innerHTML = "name is to long";
         } else {
            spanName.innerHTML = "yolo";
         }
        console.log(nameVal);
      }
    }

```