jQuery validation: some of the required field not filled but the form can still be submitted

前端 未结 3 1325
挽巷
挽巷 2021-01-26 01:18

I used jquery validation (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) for form validation. The followings are some fragments of my code:

HTML:

<
3条回答
  •  难免孤独
    2021-01-26 01:58

    I had the same problem, what I did is:
    1) change the the submit button :
    from :

    
    
    to
    
       
    
    (the save button is not going to submit the form when is click it).
    

    2)change my validation script to:

    
    

    when the "save" button is hit, it validates the form. if the validation is correct, then it's going to submit the form.

提交回复
热议问题