diff --git a/CRM/Contact/Form/Edit/TagsAndGroups.php b/CRM/Contact/Form/Edit/TagsAndGroups.php index e9ffa6f6677b..611f2751cf5e 100644 --- a/CRM/Contact/Form/Edit/TagsAndGroups.php +++ b/CRM/Contact/Form/Edit/TagsAndGroups.php @@ -137,6 +137,9 @@ public static function buildQuickForm( if (!empty($tags)) { $form->add('select2', 'tag', ts('Tag(s)'), $tags, FALSE, ['class' => 'huge', 'placeholder' => ts('- select -'), 'multiple' => TRUE]); + if ($isRequired) { + $form->addRule('tag', ts('Tag is a required field.'), 'required'); + } } // build tag widget