code: function(view, attr, error, selector) {
        view.$('[' + selector + '~="' + attr + '"]')
            .addClass('invalid')
            .attr('data-error', error);
      }
docs: Gets called when a field in the view becomes invalid. Adds a error message. Should be overridden with custom functionality.