📅  最后修改于: 2022-03-11 15:03:44.907000             🧑  作者: Mango
$.validator.addMethod("roles", function(value, elem, param) {
return $(".roles:checkbox:checked").length > 0;
},"You must select at least one!");