jQuery Validate Uncaught TypeError: Cannot call method 'getAttribute' of undefined

前端 未结 1 1453
清歌不尽
清歌不尽 2021-02-20 16:33

Given this HTML using jQuery validate

  
 
相关标签:
1条回答
  • 2021-02-20 17:18

    The 'name' attribute is missing:

    <input id="accept-terms" name="accept-terms" type="checkbox" class="required"/> 
    

    (This took me a while to figure out so I thought I'd share the question and solution)

    Also: Check the comments below, as others have posted other causes for the same exception.

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