"You must enter a valid value" for input type = "number" with the correct number

This code triggers an invalid response in IE11:

<form onsubmit="alert('Valid Number!');return false;">
<input type="number" step="0.01" value="9583.89" min="0" max="10000" />
<input type="submit" />
</form>

And JSFiddle: https://jsfiddle.net/pvsojuhs/

Expected Result: "Valid Number!" but it looks like IE11 considers this to be an invalid number.

Is there a problem with this problem? Other numbers, such as "9583.19", work fine.

Some other tests:

  • 8192.12 (INVALID)
  • 8192.13 (INVALID)
  • 8192.14 (INVALID)
  • 8192.15 (VALID)
  • 8192.20 (VALID)
  • 8192.21 (INVALID)
+4
source share

Source: https://habr.com/ru/post/1625188/


All Articles