From ee9057a5fac629914a2916a6449f62f2c391f4b0 Mon Sep 17 00:00:00 2001 From: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com> Date: Mon, 21 Nov 2022 11:15:00 +0100 Subject: [PATCH] Alerting: Remove checkForPathSeparator validation in alert rule name (#59014) Remove checkForPathSeparator validation in alert rule name --- .../unified/components/rule-editor/AlertRuleForm.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/public/app/features/alerting/unified/components/rule-editor/AlertRuleForm.tsx b/public/app/features/alerting/unified/components/rule-editor/AlertRuleForm.tsx index 692ee68955d..270fdf07d1d 100644 --- a/public/app/features/alerting/unified/components/rule-editor/AlertRuleForm.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/AlertRuleForm.tsx @@ -27,7 +27,6 @@ import { NotificationsStep } from './NotificationsStep'; import { RuleEditorSection } from './RuleEditorSection'; import { RuleInspector } from './RuleInspector'; import { QueryAndExpressionsStep } from './query-and-alert-condition/QueryAndExpressionsStep'; -import { checkForPathSeparator } from './util'; const recordingRuleNameValidationPattern = { message: @@ -58,16 +57,6 @@ const AlertRuleNameInput = () => { {...register('name', { required: { value: true, message: 'Must enter an alert name' }, pattern: ruleFormType === RuleFormType.cloudRecording ? recordingRuleNameValidationPattern : undefined, - validate: { - pathSeparator: (value: string) => { - // we use the alert rule name as the "groupname" for Grafana managed alerts, so we can't allow path separators - if (ruleFormType === RuleFormType.grafana) { - return checkForPathSeparator(value); - } - - return true; - }, - }, })} placeholder="Give your alert rule a name." />