diff --git a/uw_cfg_common.module b/uw_cfg_common.module index 68b9e459013cf3e2f3e94dd24eaf3e126c78b793..f149a9fc4b970e424ca3347e5f5ce20ffd11d32c 100644 --- a/uw_cfg_common.module +++ b/uw_cfg_common.module @@ -1074,8 +1074,12 @@ function _uw_cfg_common_banner_validate(array &$form, FormStateInterface $form_s foreach ($values['field_uw_banner'] as $key => $value) { // Ensure that the key is an integer, since there is an add_more - // in the values. - if (is_int($key)) { + // in the values. We also need to check if there is "top" in the + // array, as this is what paragraphs uses for closed items. These + // closed items have already been validated so if there is a closed + // item we can just ignore it, only open items, meaning it has values + // in the fields needs to be validated. + if (is_int($key) && !$value['top']) { // If there is no selection on the media, then there is no image, // so set the error.