Koili
03/09/2023, 9:13 AMmedias form field?
my usecase would be validating that a block-editor block with a medias form field, has at least X amount of images attached in a single medias form field
Something along the lines of this:
php
@twillBlockValidationRules([
'medias.cover' => [
'required',
'min:12'
],
])
EDIT:
Nevermind I figured out how to target the medias.cover properly. Ended up using this:
php
@twillBlockValidationRules([
'cover' => [
'required',
'array',
'between:12,16'
],
])
where the medias form field name is cover