jQuery validate rule ONLY AT SUBMIT

后端 未结 6 2175
感动是毒
感动是毒 2020-12-09 02:14

Say i have a form that looks up city, state locations. if the user enters an incorrect city, state, i want the form to be able to check the database against the users input

6条回答
  •  自闭症患者
    2020-12-09 02:56

    All of the validations can be set independently (onclick, onkeypress,onsubmit,etc.)

    Demos and details are available on the docs site http://docs.jquery.com/Plugins/Validation/validate

    
    $("#form").validate({
       onkeyup: false,
       onclick: false
    })
    

提交回复
热议问题