protected function makeValidator($rules = [])
    {
        // Get the casted model attributes.
        $attributes = $this->getModelAttributes();

        if ($this->getInjectUniqueIdentifier()) {
            $rules = $this->injectUniqueIdentifierToRules($rules);
        }

        $messages = $this->getValidationMessages();

        $validator = $this->getValidator()->make($attributes, $rules, $messages);

        if ($this->getValidationAttributeNames()) {
            $validator->setAttributeNames($this->getValidationAttributeNames());
        }

        return $validator;
    }
protected function makeValidator($rules = [])
    {
        // Get the casted model attributes.
        $attributes = $this->getModelAttributes();

        if ($this->getInjectUniqueIdentifier()) {
            $rules = $this->injectUniqueIdentifierToRules($rules);
        }

        $messages = $this->getValidationMessages();

        $validator = $this->getValidator()->make($attributes, $rules, $messages);

        if ($this->getValidationAttributeNames()) {
            $validator->setAttributeNames($this->getValidationAttributeNames());
        }

        return $validator;
    }
protected function makeValidator ( $ rules = [ ] ) { // Get the casted model attributes. $ attributes = $ this -> getModelAttributes ( ) ; if ( $ this -> getInjectUniqueIdentifier ( ) ) { $ rules = $ this -> injectUniqueIdentifierToRules ( $ rules ) ; } $ messages = $ this -> getValidationMessages ( ) ; $ validator = $ this -> getValidator ( ) -> make ( $ attributes , $ rules , $ messages ) ; if ( $ this -> getValidationAttributeNames ( ) ) { $ validator -> setAttributeNames ( $ this -> getValidationAttributeNames ( ) ) ; } return $ validator ; }
Make a Validator instance for a given ruleset.

@param  array $rules
@return \Illuminate\Validation\Factory
Make a Validator instance for a given ruleset .