Validation Failure is throwing array_replace_recursive() error
Hi,
I am getting the following error
array_replace_recursive(): Argument #2 must be of type array, int given
at \vendor\laravel\framework\src\Illuminate\Translation\FileLoader.php: 129
Whenever my validation is failing. I have tried all the methods.
My Validation logic is as follows:
$request->validate([
'user_id' => 'required',
]);
I have banged my head everywhere. But no solution is found.
I am sending user_id = null to check if validation is working or not.
But it is throwing error. When I send valid user_id, everything works smoothly. No error is observed.
I have checked in the code at the places where it was working earlier. At the initial stages of my project, Laravel validations was working fine. After that, at those places nothing has been changed.
But now, validation is throwing same error at those places as well. So it seems there is no issue here with this code. But at some other place.
And now I am totally blind where to look for.
Now I am commenting validations in all my code and will activate very first only validation that I wrote and will check if it is working or not. As that was working at that time.
@Tray2
I just commented validation at all pages. And kept only the very first validation which was working.
But it is also not working now. This page has not been changed from starting