I have a textbox for Age:
<input type="text" id="txtAge" name="txtAge" class="text" placeholder="Age (optional)" maxlength="2">
Upon clicking submit, this input is instantly bordered red. There is no postback. I'm assuming IE10 believes the client has actually typed in "Age (optional)" which is greater than the maxlength
of 2.
Is there anyway to get around this without making the user do anything in their browser's settings and without removing the maxlength
attribute?
You can use the novalidate
and formnovalidate
attributes. See this link for more information.
Internet Explorer 10 and Windows Store apps using JavaScript add new support for HTML5 Forms, including new states of the type attribute (on the input element), new attributes for the input element, and the progress element. This support enables developers to quickly and easily provide user prompting, input validation, and feedback with a minimal amount of script.
Source: http://msdn.microsoft.com/en-us/library/ie/hh673544(v=vs.85).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With