code: public function formRequest($formRequest, $selector = null)
      {
          if (! is_object($formRequest)) {
              $formRequest = $this->createFormRequest($formRequest);
          }
  
          $rules = method_exists($formRequest, 'rules') ? $formRequest->rules() : [];
  
          $validator = $this->getValidatorInstance($rules, $formRequest->messages(), $formRequest->attributes());
  
          return $this->validator($validator, $selector);
      }
docs: Creates JsValidator instance based on FormRequest.
  
  @param $formRequest
  @param null $selector
  @return \Proengsoft\JsValidation\Javascript\JavascriptValidator
  
  @throws \Illuminate\Contracts\Container\BindingResolutionException