[
{
type: "link",
url: "https://link.com",
...
},
{
type: "image",
id: "drre-ggre-765",
image: "url"
...
},
{
type: "arrayOfLinks",
links: [
{
link: "www.www",
title: "Title"
}
...
]
}
...
]
$rules = [...];
foreach ($this->get('some-field') as $index => $item) {
switch ($item['type']) {
case 'some-type':
$rules["some-field.{$index}"] = [
'some-rule',
]
break;
}
}
return $rules;