JQuery checks error with necessary check on IE10 in IE7 / IE8 compatibility mode

There is a confirmed error in IE10 compatibility mode , which will not be fixed for IE10:

In IE10, in conjunction with IE8,
$ element.get (0) .getAttribute ("required") returns "" when the required attribute is missing, this necessitates all fields

In IE10, in conjunction with IE7,
$ element.get (0) .getAttribute ("required") returns null in all cases.
therefore you cannot use the required attribute of an element

The author of the plugin does not plan to handle compatibility views, since users should not meet it, but developers who just want to test something in the old IE may want to

0
source share
2 answers

In IE10, in compatibility with IE8,
element.attributes ["required"] is null if the required attribute is missing

In IE10, it is compatible with IE7
element.attributes ["required"]. value returns "-1" if an attribute attribute is required, and "null" otherwise

jQuery https://github.com/avipinto/jquery-validation/commit/a22d4c37c3047199bf17a4943e3be352d88d8158

0

,

$element.get(0).hasAttribute( "required" )

getAttribute()

0

All Articles