Hi Peter,
Thanks for your reply. You are right, scenario 2 indeed doesn't block saving.
Scenario 1 still block saving when only checking checkbox A.
For reference the meta box to reproduce the problem:
$meta_boxes[] = [
'title' => 'Conditional vibility',
'post_types' => 'post',
'fields' => [
[
'name' => 'Checkbox A',
'id' => 'checkboxA',
'type' => 'checkbox',
],
[
'id' => 'group',
'type' => 'group',
'visible' => [ 'checkboxA', true ],
'fields' => [
[
'id' => 'checkboxB',
'name' => __( 'Checkbox B', 'siw' ),
'type' => 'checkbox',
],
[
'id' => 'text',
'name' => __( 'Text', 'siw' ),
'type' => 'text',
'visible' => [ 'group_checkboxB', true ],
'required' => true,
],
],
],
],
];