I can see that none of the other answers have addressed the real reason you're getting this error, I'll try and provide some insights and a solution to it.
The problem here is that Laravel is testing all validation rules and not stopping after the first validation error which in your case is numeric
(which fails since the value provided is a string), if it did that the error with the gt
validator being provided a string value wouldn't be thrown since the validator has already exited after the numeric
error.
To have Laravel stop the validation checks after the first failed validation rule, you can prefix your validation rules with the bail
validator which basically tells Laravel to stop after the first error.
The resulting code would look like this:
$request->validate([
'product_price' => 'bail|required|numeric|gt:0',
]);
Note that this solution also makes it so that only a single error is ever returned per field, if in your UI you usually display all the errors for a particular field at a time (instead of only picking the first one from the message bag), this solution would change that.
More information on the bail
validation rule can be found here: https://laravel.com/docs/6.x/validation#rule-bail
gt:field
, in your cause you gave 0. laravel.com/docs/5.7/validation#rule-gt – Horrorstruck