protected function performValidation(Model $model, $event)
    {
        // If the model has validating enabled, perform it.
        if ($model->getValidating()) {
            // Fire the namespaced validating event and prevent validation
            // if it returns a value.
            if ($this->fireValidatingEvent($model, $event) !== null) {
                return;
            }

            if ($model->isValid() === false) {
                // Fire the validating failed event.
                $this->fireValidatedEvent($model, 'failed');

                if ($model->getThrowValidationExceptions()) {
                    $model->throwValidationException();
                }

                return false;
            }
            // Fire the validating.passed event.
            $this->fireValidatedEvent($model, 'passed');
        } else {
            $this->fireValidatedEvent($model, 'skipped');
        }
    }
protected function performValidation(Model $model, $event)
    {
        // If the model has validating enabled, perform it.
        if ($model->getValidating()) {
            // Fire the namespaced validating event and prevent validation
            // if it returns a value.
            if ($this->fireValidatingEvent($model, $event) !== null) {
                return;
            }

            if ($model->isValid() === false) {
                // Fire the validating failed event.
                $this->fireValidatedEvent($model, 'failed');

                if ($model->getThrowValidationExceptions()) {
                    $model->throwValidationException();
                }

                return false;
            }
            // Fire the validating.passed event.
            $this->fireValidatedEvent($model, 'passed');
        } else {
            $this->fireValidatedEvent($model, 'skipped');
        }
    }
protected function performValidation ( Model $ model , $ event ) { // If the model has validating enabled, perform it. if ( $ model -> getValidating ( ) ) { // Fire the namespaced validating event and prevent validation // if it returns a value. if ( $ this -> fireValidatingEvent ( $ model , $ event ) !== null ) { return ; } if ( $ model -> isValid ( ) === false ) { // Fire the validating failed event. $ this -> fireValidatedEvent ( $ model , 'failed' ) ; if ( $ model -> getThrowValidationExceptions ( ) ) { $ model -> throwValidationException ( ) ; } return false ; } // Fire the validating.passed event. $ this -> fireValidatedEvent ( $ model , 'passed' ) ; } else { $ this -> fireValidatedEvent ( $ model , 'skipped' ) ; } }
Perform validation with the specified ruleset.

@param  \Illuminate\Database\Eloquent\Model $model
@param  string $event
@return boolean
Perform validation with the specified ruleset .