HTML5 validation before ajax submit

前端 未结 6 1578
既然无缘
既然无缘 2020-12-01 01:38

This should be simple, yet it\'s driving me crazy. I have an html5 form that I am submitting with ajax. If you enter an invalid value, there is a popup response that tells y

6条回答
  •  伪装坚强ぢ
    2020-12-01 02:16

    U can also use jquery validate method to validate form like

    $("#form id").validate();

    which return boolean value based on form validation & also u can see the error in log using errorList method.

    for use above functionality u must include jquery.validate.js file in your script

提交回复
热议问题