title: Searching validityState for values
body: <p>I may be approaching this the wrong way, but I'm confused how to extract information from an <code>input</code>'s <code>validityState</code> object.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var input = document.querySelector('#myinput');
  var validity = input.validity;
  var keys = Object.keys(validity);
  
  console.log( validity );          // [ object validityState ]
  console.log( validity.valid );    // false (this is expected)
  
  console.log( keys )               // empty array
  console.log( keys.length )        // 0</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text" id="myinput" required&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My main question is, how do I find out which property is "failing" if I can't iterate over the <code>validityState</code> object?</p>
  
  <p>Am I missing something?</p>