examples/TodoMVC/bower_components/backbone/backbone.js
function(attrs, options) {
      if (!options.validate || !this.validate) return true;
      attrs = _.extend({}, this.attributes, attrs);
      var error = this.validationError = this.validate(attrs, options) || null;
      if (!error) return true;
      this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
      return false;
    }
function(attrs, options) {
      if (!options.validate || !this.validate) return true;
      attrs = _.extend({}, this.attributes, attrs);
      var error = this.validationError = this.validate(attrs, options) || null;
      if (!error) return true;
      this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
      return false;
    }
function ( attrs , options ) { if ( ! options . validate || ! this . validate ) return true ; attrs = _ . extend ( { } , this . attributes , attrs ) ; var error = this . validationError = this . validate ( attrs , options ) || null ; if ( ! error ) return true ; this . trigger ( 'invalid' , this , error , _ . extend ( options , { validationError : error } ) ) ; return false ; }
Run validation against the next complete set of model attributes, returning `true` if all is well. Otherwise, fire an `"invalid"` event.
Run validation against the next complete set of model attributes returning true if all is well . Otherwise fire an invalid event .