input fields maxlength ignored, as well as number type RRS feed

  • Question

  • I think this worked before. Declaring an input field with "number" type and "maxlength='10'" still lets me enter more than 10 characters (not only numbers).
    Wednesday, April 9, 2014 9:08 AM

All replies

  • Can you provide more details on how you're reproducing this? I can't repro with a blank app and the HTML:

     <input type="number" maxlength="10" />

    Either typing directly or pasting longer text limits me to 10 characters. The type="number" is (I believe) advisory: it will let the soft keyboard know to open in numeric mode but it won't restrict the text entry. You would need to do that validation in code.


    Thursday, April 10, 2014 12:46 AM
  • Try entering non-numbers. Not only does the "number" input allow that, even worse, it forgets about the limitation at all. You can enter as much "non number stuff" as you like. I believe the input "number" control on IE11 is broken at the moment. It worked before, I am sure.
    Thursday, April 10, 2014 11:00 AM