src/Prettus/Repository/Eloquent/BaseRepository.php
public function validator()
    {

        if (isset($this->rules) && !is_null($this->rules) && is_array($this->rules) && !empty($this->rules)) {
            if (class_exists('Prettus\Validator\LaravelValidator')) {
                $validator = app('Prettus\Validator\LaravelValidator');
                if ($validator instanceof ValidatorInterface) {
                    $validator->setRules($this->rules);

                    return $validator;
                }
            } else {
                throw new Exception(trans('repository::packages.prettus_laravel_validation_required'));
            }
        }

        return null;
    }
public function validator()
    {

        if (isset($this->rules) && !is_null($this->rules) && is_array($this->rules) && !empty($this->rules)) {
            if (class_exists('Prettus\Validator\LaravelValidator')) {
                $validator = app('Prettus\Validator\LaravelValidator');
                if ($validator instanceof ValidatorInterface) {
                    $validator->setRules($this->rules);

                    return $validator;
                }
            } else {
                throw new Exception(trans('repository::packages.prettus_laravel_validation_required'));
            }
        }

        return null;
    }
public function validator ( ) { if ( isset ( $ this -> rules ) && ! is_null ( $ this -> rules ) && is_array ( $ this -> rules ) && ! empty ( $ this -> rules ) ) { if ( class_exists ( 'Prettus\Validator\LaravelValidator' ) ) { $ validator = app ( 'Prettus\Validator\LaravelValidator' ) ; if ( $ validator instanceof ValidatorInterface ) { $ validator -> setRules ( $ this -> rules ) ; return $ validator ; } } else { throw new Exception ( trans ( 'repository::packages.prettus_laravel_validation_required' ) ) ; } } return null ; }
Specify Validator class name of Prettus\Validator\Contracts\ValidatorInterface

@return null
@throws Exception
Specify Validator class name of Prettus \ Validator \ Contracts \ ValidatorInterface