如何在 Meteor JS 的 focusout 上编写输入验证代码?

How to code input validation on focusout in Meteor JS?

如何在进入 Meteor JS 中的下一个输入字段之前验证 focusout 上的输入字段?就像 AngularJS.

将事件处理程序附加到字段的 change 事件,例如:

Template.myTemplate.events({
  'change #myField'(event) {
    // do your validation here
  }
});

您可以在这样的活动中使用focusout

Template.templateName.events({
  'focusout #inputId' (event, instance) {
    // insert code in here :D 
  }
});