init
を実行するCan JSモデルがあります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);
}
}, {
});
(完全なコードはここにあります。)