Search code examples
validationmeteorinputmeteor-blaze

How to code input validation on focusout in Meteor JS?


How to validate input fields on focusout before going for the next input field in Meteor JS? Like in AngularJS.


Solution

  • Attach an event handler to the field's change event, for example:

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