jQuery validation onblur

前端 未结 6 1261
迷失自我
迷失自我 2020-12-01 12:26

I am trying to get the jQuery validation working on a webpage I am creating. I have about 6 different fieldsets that contain the page\'s details. I am using this as I am hid

6条回答
  •  长情又很酷
    2020-12-01 12:52

    You can also use the element call of the validator.

       $('form').validate({
            onfocusout: function(element) {
               this.element(element);
            },
            rules: {
                name: 'required',
                from: 'required'
    
            },
            messages: {
                name: 'Please enter your firstname',
                from: 'Please enter where are you from'
            }
        });
    

提交回复
热议问题