I would like to handle POST requests with an array of objects in their body as follows:
[
{"path":"./../../", ...},
{"path":"./../../", ...},
{"path":"./../../", ...},
...
]
I haven't found any way to set a validation rule that will limit the max length of such an array, that is located in the root of the POST request body, for example up to 100 objects.
The only related solution I see here is to limit the PHP POST size via post_max_size
option, however, it's not what I am looking for. Does anyone know how to set a proper validation rule for this case?
I'm using Laravel8.