代码如下:$(“#btnAddSaveTestSubject”).click(function () { //增加时的验证,保存 jQuery.validator.addMethod(“admissionBatch”, function (value, element) { return this.optional(element) || value != 0; }, “请选择招生批次”); jQuery.validator.addMethod(“educationLevel”, function (value, e