title: parseFloat function does not work as expected
body: <p>I need to validate textbox entry. It should allow only integers as entityframework fails if user enters characters in this field during binding.</p>
  
  <p>Here is problem:</p>
  
  <p>When user enters <code>10-d</code> in this field, <code>parseFloat</code> returns <code>true</code> as it takes <code>10</code> as number and ignores the rest of values. While IMO it should throw NAN error as input text can not be converted to float.</p>
  
  <p>Please see following samples and you can play with it.
  <a href="http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_parsefloat" rel="nofollow">http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_parsefloat</a></p>
  
  <p>The one i am interested it to get NAN for 40 Years input in examples above.</p>
  
  <pre><code>document.write(parseFloat("40 years") + "&lt;br /&gt;");
  </code></pre>
  
  <p>Let me know if i need to do some more verification.</p>