Can JQuery.Validate plugin prevent submission of an Ajax form

后端 未结 7 1790
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-02 15:00

I am using the JQuery form plugin (http://malsup.com/jquery/form/) to handle the ajax submission of a form. I also have JQuery.Validate (http://docs.jquery.com/Plugins/Validatio

7条回答
  •  执念已碎
    2021-02-02 15:29

    Just as a first pass, I'm wondering why the line

    $("form").validate({
    

    doesn't refer to $("searchform"). I haven't looked this up, or tried it, but that just seems to be a mismatch. Wouldn't you want to call validate on the appropriate form?

    Anyway, if this is completely wrong, then the error isn't immediately obvious. :)

提交回复
热议问题