diff --git a/src/layouts/EditHomepage/EditHomepage.jsx b/src/layouts/EditHomepage/EditHomepage.jsx index 5c189b216..382f4ce5f 100644 --- a/src/layouts/EditHomepage/EditHomepage.jsx +++ b/src/layouts/EditHomepage/EditHomepage.jsx @@ -578,6 +578,7 @@ const EditHomepage = ({ match }) => { .announcements.announcement_items[announcementItemsIndex].link_url const isLinkUrlError = isLinkTextFilled && !isLinkUrlFilled + const isLinkTextError = !isLinkTextFilled && isLinkUrlFilled const isLinkUrlOrTextChanged = field === "link_text" || field === "link_url" if (isLinkUrlOrTextChanged) { @@ -586,6 +587,11 @@ const EditHomepage = ({ match }) => { ].link_url = isLinkUrlError ? "Please specify a URL for your link" : "" + newErrors.announcementItems[ + announcementItemsIndex + ].link_text = isLinkTextError + ? "Please specify text for your link" + : "" } setFrontMatter({