diff --git a/src/JsValidatorFactory.php b/src/JsValidatorFactory.php index 80435496..638033ef 100644 --- a/src/JsValidatorFactory.php +++ b/src/JsValidatorFactory.php @@ -152,7 +152,7 @@ private function newFormRequestValidator($formRequest, $selector) // Replace all rules with Noop rules which are checked client-side and always valid to true. // This is important because jquery-validation expects fields under validation to have rules present. For // example, if you mark a field as invalid without a defined rule, then unhighlight won't be called. - $rules = method_exists($formRequest, 'rules') ? $formRequest->rules() : []; + $rules = method_exists($formRequest, 'rules') ? $this->app->call([$formRequest, 'rules']) : []; foreach ($rules as $key => $value) { $rules[$key] = 'proengsoft_noop'; }