diff --git a/docroot/modules/humsci/hs_blocks/src/Plugin/Block/SocialMediaBlock.php b/docroot/modules/humsci/hs_blocks/src/Plugin/Block/SocialMediaBlock.php index e11f22e95..b17329491 100644 --- a/docroot/modules/humsci/hs_blocks/src/Plugin/Block/SocialMediaBlock.php +++ b/docroot/modules/humsci/hs_blocks/src/Plugin/Block/SocialMediaBlock.php @@ -181,12 +181,12 @@ public static function validateUrl(array &$element, FormStateInterface $form_sta if (str_starts_with($value, 'mailto')) { if (!preg_match($mailto_regex, $value)) { $form_state->setError($element, t('The mailto link must include a valid email address (e.g., mailto:example@example.com).')); - return; } + return; } - else { - URL::validateUrl($element, $form_state, $complete_form); - } + + URL::validateUrl($element, $form_state, $complete_form); + } /**