From 9c4b78ae4f52ca0e00077241c27e2dcb1008cfde Mon Sep 17 00:00:00 2001 From: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com> Date: Tue, 22 Nov 2022 12:26:07 +0100 Subject: [PATCH] Alerting: add group name validation in alert rule form (#59095) Add group name validation in alert rule form --- .../alerting/unified/components/rule-editor/FolderAndGroup.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/features/alerting/unified/components/rule-editor/FolderAndGroup.tsx b/public/app/features/alerting/unified/components/rule-editor/FolderAndGroup.tsx index be1e2ee99b7..6b9aee47954 100644 --- a/public/app/features/alerting/unified/components/rule-editor/FolderAndGroup.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/FolderAndGroup.tsx @@ -203,6 +203,9 @@ export function FolderAndGroup({ initialFolder }: FolderAndGroupProps) { control={control} rules={{ required: { value: true, message: 'Must enter a group name' }, + validate: { + pathSeparator: (group_: string) => checkForPathSeparator(group_), + }, }} />