{
"name" : "parent_node",
"children:
[
{
"name" : "child-1",
"children:
[
{
"name" : "subchild-1",
//unlimited childrens
}
]
}
]
}
------------------------------------------
$rules = ([
'name' => 'required|string',
'children.*.name' => 'required|string'
]);
- I want to check validation dynamically on dynamic nested array
- Instead of using 'children.*.name
- Validation should check nested array itself because i didn't bound
nested array at any level, so there are infinite levels
- You can see the image
'https://drive.google.com/file/d/1PAZC_TQQpwSEsY-ecUjh4lKoNcpKoOj9/view?usp=sharing'