-
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
I am using ACF Composer v3.4.3
I added a block and I am not able to validate the required fields.
Saving the current post, without inserting none of the required fields, it is not raising the ACF validation.

/**
* @throws FieldNameCollisionException
*/
public function fields(): array
{
$fields = Builder::make(
name: 'block_links_section_fields',
config: [
'title' => 'Title',
]
);
// icons collection
$iconCollection = IconEnum::itemsWithDefaultValue();
$fields
->addTrueFalse(
name: 'top_position_icon',
args: [
'label' => 'Label',
'ui' => true,
]
)->addNumber(
name: 'items_per_view',
args: [
'label' => 'Other label',
'max' => 6,
'min' => 1,
]
)->addRepeater(
name: 'links',
args: [
'label' => 'Other Label',
'required' => true,
],
)
->addLink(
name: 'link',
args: [
'label' => 'Other Label',
'required' => true,
]
)
->addSelect(
name: 'icon',
args: [
'choices' => $iconCollection->toArray(),
'label' => 'Other Label',
'ui' => true,
]
)
->endRepeater();
return $fields->build();
}
Do you have any idea?
Metadata
Metadata
Assignees
Labels
No labels