jQuery validate bug with required validation on IE10 in compatibility mode to IE7/IE8

后端 未结 2 846
日久生厌
日久生厌 2020-12-22 06:49

there is a Confirmed bug in IE10 compatibility mode that won\'t be fixed for IE10:

In IE10 in compatibility to IE8
$element.get(0).getAttribute(

相关标签:
2条回答
  • 2020-12-22 07:27

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

    In IE10 in compatibility to IE7
    element.attributes["required"].value returns "-1" if required attribute exists and "null" otherwise

    so updated my fork to the jQuery validate plugin for this fix all details here https://github.com/avipinto/jquery-validation/commit/a22d4c37c3047199bf17a4943e3be352d88d8158

    0 讨论(0)
  • 2020-12-22 07:36

    I changed mine to call

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

    before checking the value with getAttribute()

    0 讨论(0)
提交回复
热议问题