jQuery Validate - can I re-validate a group of fields after changing one?

后端 未结 2 622
半阙折子戏
半阙折子戏 2020-12-04 00:01

I\'m using jQuery Validate and would like to re-validate a group of fields whenever one of them is changed (or possibly, whenever one of them validates successfully). My att

2条回答
  •  暖寄归人
    2020-12-04 00:34

    Dont know how this worked but, just found that removing the below part:

    if(!$(element).data('reval')) {
            var fields = $(options[1], element.form);
            fields.data('reval', true).valid();
            fields.data('reval', false);
    }
    

    of code from the main code make all the validations to work as normal and expected. :)

提交回复
热议问题