-
-
Notifications
You must be signed in to change notification settings - Fork 174
Troubleshooting
albertmoreno edited this page Jan 13, 2016
·
6 revisions
Some times Fatal Error Method \Proengsoft\JsValidation\Javascript\JavascriptValidator::__toString()
can occur when view is rendered using __toString() magic method.
<script type="text/javascript" src="{{ asset('vendor/jsvalidation/js/jsvalidation.js')}}"></script>
{!! JsValidator::formRequest('App\Http\Requests\FontUploadRequest') !!}
This happen when occurs any Exception, because [You cannot throw an exception from within a __toString() method. Doing so will result in a fatal error.] (http://php.net/manual/en/language.oop5.magic.php#object.tostring).
To debug your code you can use render() method tho generate Javascript Validations. In this case the exceptions are thrown as usual.
JsValidator::formRequest('App\Http\Requests\FontUploadRequest')->render()