我有一个Can JS模型,init
运行this.validateNonBlank("title");
。当我退出onblur
字段时,如何触发该验证以运行title
?现在它仅在另一个元素触发change
事件时触发。
can.Model.Cacheable("CMS.Models.Program", {
root_object : "program"
, root_collection : "programs"
...
, links_to : {
"Regulation" : "ProgramDirective"
, "Policy" : "ProgramDirective"
...
, "Market" : {}
}
, init : function() {
var that = this;
this.validateNonBlank("title");
this._super.apply(this, arguments);
}
}, {
});
(完整代码为here。)