diff --git a/public/app/features/alerting/unified/components/receivers/form/GrafanaReceiverForm.tsx b/public/app/features/alerting/unified/components/receivers/form/GrafanaReceiverForm.tsx index b66413d791e..3ab821449d7 100644 --- a/public/app/features/alerting/unified/components/receivers/form/GrafanaReceiverForm.tsx +++ b/public/app/features/alerting/unified/components/receivers/form/GrafanaReceiverForm.tsx @@ -20,6 +20,7 @@ import { updateConfigWithReceiver, } from '../../../utils/receiver-form'; import { ProvisionedResource, ProvisioningAlert } from '../../Provisioning'; +import { ReceiverTypes } from '../grafanaAppReceivers/onCall/onCall'; import { useOnCallIntegration } from '../grafanaAppReceivers/onCall/useOnCallIntegration'; import { GrafanaCommonChannelSettings } from './GrafanaCommonChannelSettings'; @@ -167,7 +168,7 @@ export const GrafanaReceiverForm = ({ existing, alertManagerSourceName, config } defaultItem={{ ...defaultChannelValues }} takenReceiverNames={takenReceiverNames} commonSettingsComponent={GrafanaCommonChannelSettings} - customValidators={onCallFormValidators} + customValidators={{ [ReceiverTypes.OnCall]: onCallFormValidators }} /> setTestChannelValues(undefined)} diff --git a/public/app/features/alerting/unified/components/receivers/form/ReceiverForm.tsx b/public/app/features/alerting/unified/components/receivers/form/ReceiverForm.tsx index fc7f0371772..a301e3573e5 100644 --- a/public/app/features/alerting/unified/components/receivers/form/ReceiverForm.tsx +++ b/public/app/features/alerting/unified/components/receivers/form/ReceiverForm.tsx @@ -34,7 +34,7 @@ interface Props { initialValues?: ReceiverFormValues; isEditable: boolean; isTestable?: boolean; - customValidators?: React.ComponentProps['customValidators']; + customValidators?: Record['customValidators']>; } export function ReceiverForm({ @@ -167,7 +167,7 @@ export function ReceiverForm({ commonSettingsComponent={commonSettingsComponent} isEditable={isEditable} isTestable={isTestable} - customValidators={customValidators} + customValidators={customValidators ? customValidators[field.type] : undefined} /> ); })}