jquery validate checkbox验证

北方
$(document).ready(function () {

    $('#formid').validate({ // initialize the plugin
        rules: {
            'test[]': {
                required: true,
                maxlength: 2
            }
        },
        messages: {
            'test[]': {
                required: "You must check at least 1 box",
                maxlength: "Check no more than {0} boxes"
            }
        }
    });

});
阅读 322

lovema.xyz

77 声望
8 粉丝
0 条评论

lovema.xyz

77 声望
8 粉丝
宣传栏