public function validator(Factory $factory)
    {
        if (!$this->shouldBeValidated()) {
            return $factory->make([], []);
        }
        
        $rules = app()->call([$this, 'rules']);

        return $factory->make(
            $this->all(), $rules, $this->messages(), $this->attributes()
        );
    }