joint.all.js
function(command) {

	// Backbone.model set() and Backbone.collection add() allow to pass an option parameter.
	// That is also kept within the command. It skips validation if requested.
	if (command.options && command.options.validation === false) return true;

	var handoverErr;

	_.each(this._map[command.action], function(route) {

	    var i = 0;

	    function callbacks(err) {

		var fn = route[i++];

		try {
		    if (fn) {
			fn(err, command, callbacks);
		    } else {
			handoverErr = err;
			return;
		    }
		} catch (err) {
		    callbacks(err);
		}
	    };

	    callbacks(handoverErr);
	});

	if (handoverErr) {

	    if (this.get('cancelInvalid')) this._commandManager.cancel();
	    this.trigger('invalid', handoverErr);
	    return false;
	}

	//command is valid
	return true;
    }
function(command) {

	// Backbone.model set() and Backbone.collection add() allow to pass an option parameter.
	// That is also kept within the command. It skips validation if requested.
	if (command.options && command.options.validation === false) return true;

	var handoverErr;

	_.each(this._map[command.action], function(route) {

	    var i = 0;

	    function callbacks(err) {

		var fn = route[i++];

		try {
		    if (fn) {
			fn(err, command, callbacks);
		    } else {
			handoverErr = err;
			return;
		    }
		} catch (err) {
		    callbacks(err);
		}
	    };

	    callbacks(handoverErr);
	});

	if (handoverErr) {

	    if (this.get('cancelInvalid')) this._commandManager.cancel();
	    this.trigger('invalid', handoverErr);
	    return false;
	}

	//command is valid
	return true;
    }
function ( command ) { // Backbone.model set() and Backbone.collection add() allow to pass an option parameter. // That is also kept within the command. It skips validation if requested. if ( command . options && command . options . validation === false ) return true ; var handoverErr ; _ . each ( this . _map [ command . action ] , function ( route ) { var i = 0 ; function callbacks ( err ) { var fn = route [ i ++ ] ; try { if ( fn ) { fn ( err , command , callbacks ) ; } else { handoverErr = err ; return ; } } catch ( err ) { callbacks ( err ) ; } } ; callbacks ( handoverErr ) ; } ) ; if ( handoverErr ) { if ( this . get ( 'cancelInvalid' ) ) this . _commandManager . cancel ( ) ; this . trigger ( 'invalid' , handoverErr ) ; return false ; } //command is valid return true ; }
check whether the command is not against any rule
check whether the command is not against any rule