title: Getting the value of a HTML5 number input
body: <p>I'm using one of the new HTML5 input types, <a href="http://diveintohtml5.info/forms.html#type-number" rel="noreferrer">number</a>:</p>
  
  <pre><code>&lt;input type="number" /&gt;
  </code></pre>
  
  <p>In Opera, which is the only desktop browser I know of which currently recognises it, it renders it as such:</p>
  
  <p><img src="https://i.stack.imgur.com/0KdTC.png" alt="enter image description here"></p>
  
  <p>The problem I'm facing is one of validation. If a user types something invalid into the field, eg: "<code>abc</code>", the value returned by <code>myInput.value</code> is an empty string. This makes it impossible to tell whether the user left the field blank, or if they entered some incorrect data. Is there any way to get the real value of the field?</p>