jQuery Validator — only validate onblur event (not onchange)

前端 未结 2 1201
[愿得一人]
[愿得一人] 2021-01-19 02:43

I\'m using the jQuery validator and would like to validate certain elements when certain events occur.

For example: some textboxes should only validate onblur, where

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-19 03:05

    Like this:

      $('form').validate({
        onfocusout: function(e) {
          this.element(e);
        }
        , onkeyup: false
      });
    

提交回复
热议问题