如何在Model中使用自定义校验:
Birthday: { type: "date", validation: { custom: function(input) { // set the custom message input.attr("data-custom-msg", "Birthday cannot be in the future"); if (console != undefined) { console.log(input); } var today = new Date(); return input < today; } } }