From 067784dc4a0665fe66bc52aeb8cf4f251040fa53 Mon Sep 17 00:00:00 2001 From: Nathaniel Allred Date: Fri, 24 Mar 2023 14:51:28 -0500 Subject: [PATCH] Fix EmailSettings.FeedbackEmail client validation (#22611) * fix EmailSettings.FeedbackEmail client validation --- .../src/components/admin_console/admin_definition.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/channels/src/components/admin_console/admin_definition.jsx b/webapp/channels/src/components/admin_console/admin_definition.jsx index 387b13825b..5eab5ed08f 100644 --- a/webapp/channels/src/components/admin_console/admin_definition.jsx +++ b/webapp/channels/src/components/admin_console/admin_definition.jsx @@ -2497,7 +2497,11 @@ const AdminDefinition = { it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.SITE.NOTIFICATIONS)), it.stateIsFalse('EmailSettings.SendEmailNotifications'), ), - validate: validators.isRequired(t('admin.environment.notifications.feedbackEmail.required'), '"Notification From Address" is required'), + + // MM-50952 + // If the setting is hidden, then it is not being set in state so there is + // nothing to validate, and validation would fail anyways and prevent saving + validate: it.configIsFalse('ExperimentalSettings', 'RestrictSystemAdmin') && validators.isRequired(t('admin.environment.notifications.feedbackEmail.required'), '"Notification From Address" is required'), }, { type: Constants.SettingsTypes.TYPE_TEXT,