Closed msonowal closed 1 year ago
I have the same problem. And PHP starts to use a lot of CPU.
Fixed. I had a wrong point like you.
your one is different
your one is different
your code
why it has been closed? @shalvah @zloadmin ?
As the issue still exists, when you want to validate the keys with some rules like say numeric in my example.
I did not said it has a wrong point, it there intentionaly please read my issue again
Remove the extra dot.
@shalvah why? cause we want to validate the key names as per my issue stated see above
where the keys will be validated against some rules by using the dot syntax.
So here I want to validate the keys 123
and 621
to check against some rules (exists in db or id or unique or numeric`
{
"123": {"id": 1, "price": 23232},
"621": {"id": 2, "price": 23232},
}
You have an extra dot. Remove it. Ending with a dot is not valid in Laravel validation rules.
return [
- 'products.' => ['numeric',],
+ 'products' => ['numeric',],
'products.*.' => ['array:slug,price'],
];
You have an extra dot. Remove it. Ending with a dot is not valid in Laravel validation rules.
return [ - 'products.' => ['numeric',], + 'products' => ['numeric',], 'products.*.' => ['array:slug,price'], ];
@shalvah No you are wrong, It is a valid rule,
suppose you want validate the array keys for that you can use the dot syntax and validate the index as I stated above
Can you show me 1 example of that in the Laravel docs?
???
This is the PR https://github.com/knuckleswtf/scribe/pull/749
Scribe version
4.19.1
PHP version
8.1
Framework
Laravel
Framework version
v9.52.7
Scribe config
What happened?
Set the below rule in your formrequests and run the generate command it freezes
the request is
Docs