code: protected function jsValidator(Validator $validator, $selector = null)
      {
          $remote = ! $this->options['disable_remote_validation'];
          $view = $this->options['view'];
          $selector = is_null($selector) ? $this->options['form_selector'] : $selector;
  
          $delegated = new DelegatedValidator($validator, new ValidationRuleParserProxy());
          $rules = new RuleParser($delegated, $this->getSessionToken());
          $messages = new MessageParser($delegated);
  
          $jsValidator = new ValidatorHandler($rules, $messages);
  
          $manager = new JavascriptValidator($jsValidator, compact('view', 'selector', 'remote'));
  
          return $manager;
      }
docs: Creates JsValidator instance based on Validator.
  
  @param \Illuminate\Validation\Validator $validator
  @param null|string $selector
  @return \Proengsoft\JsValidation\Javascript\JavascriptValidator