title: Backbone.js: How to make the View handle the model's error?
body: <p>Basically, I want my model to have its own validation logic while having the error being passed onto the View. Here's the code, and the link: <a href="http://jsfiddle.net/jancarlo000/aRFGm/3/" rel="nofollow">http://jsfiddle.net/jancarlo000/aRFGm/3/</a></p>
  
  <p>The result is 'undefined' instead of 'age cannot be 0'</p>
  
  <pre><code>Person = Backbone.Model.extend({
      defaults: {
          'FirstName':'JC'
      },   
      initialize: function(){
          console.log('new person');
      },
      validate: function(attr){
          if (attr.Age == 0){
              return 'age cannot be 0';
          }
      }
  });
  
  AppView = Backbone.View.extend({
      initialize: function(){
          this.model.bind('error', function(model, error){ 
                                      alert(model); alert(error); 
                                   }());
      }
  });
  
  var j = new Person();
  var app = new AppView({model:j});
  app.model.set({Age:0}); &lt;=== purposely try to invoke validation error here..
  
  //note: console's target must be result(fiddle.jshell.net) 
  //in Chrome for it to work...
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>The problem was that I added an unnecessary <strong>invocation operator ()</strong> at my function.</p>