title: Any workaround of Opera 12's input type=number validity behavior?
body: <p>I was just troubleshooting an issue with a library of mine but it boils down to being something related with Opera behavior. Now, I haven't found big warnings anywhere on this issue, so my guess is that I'm missing something, or that there's a workaround that I just don't know of.</p>
  
  <p>Specifically, take a simple code like this:</p>
  
  <pre><code>&lt;input type="number" id="myNumber" /&gt;
  </code></pre>
  
  <p>On Opera 12.16, the input type=number is supported, so it'll correctly display a type=number input.</p>
  
  <p>If the user enters a valid value, say "123", then:</p>
  
  <pre><code>var myInput = document.getElementById('myNumber');
  myInput.value // =&gt; "123"
  myInput.validity // =&gt; { valid: true, typeMismatch: false, ... }
  myInput.validity.badInput // undefined
  </code></pre>
  
  <p>Now, if the user enters "123a", then:</p>
  
  <pre><code>var myInput = document.getElementById('myNumber');
  myInput.value // =&gt; ""
  myInput.validity // =&gt; { valid: true, typeMismatch: false, ... } -- why valid: true?
  myInput.validity.badInput // undefined
  </code></pre>
  
  <p>Furthermore: <code>myInput.willValidate</code> returns <code>true</code> and <code>myInput.checkValidity()</code> returns <code>true</code> as well.</p>
  
  <p>So, how can I actually check for bad input in input type=number on this version of Opera? (Consider an empty string is and should be valid input.)</p>