code: private function getValidator($model = null)
      {
          if ($this->_validator === null) {
              $this->_validator = $this->createEmbeddedValidator($model);
          }
  
          return $this->_validator;
      }
docs: Returns the validator declared in [[rule]].
  @param Model|null $model model in which context validator should be created.
  @return Validator the declared validator.