mirror of
https://github.com/sct/overseerr.git
synced 2025-09-27 04:22:37 +02:00
fix(frontend): add validation for Radarr/Sonarr server name
This commit is contained in:
@@ -11,6 +11,7 @@ import { defineMessages, useIntl } from 'react-intl';
|
||||
const messages = defineMessages({
|
||||
createradarr: 'Create New Radarr Server',
|
||||
editradarr: 'Edit Radarr Server',
|
||||
validationNameRequired: 'You must provide a server name',
|
||||
validationHostnameRequired: 'You must provide a hostname/IP',
|
||||
validationPortRequired: 'You must provide a port',
|
||||
validationApiKeyRequired: 'You must provide an API key',
|
||||
@@ -74,6 +75,9 @@ const RadarrModal: React.FC<RadarrModalProps> = ({
|
||||
rootFolders: [],
|
||||
});
|
||||
const RadarrSettingsSchema = Yup.object().shape({
|
||||
name: Yup.string().required(
|
||||
intl.formatMessage(messages.validationNameRequired)
|
||||
),
|
||||
hostname: Yup.string().required(
|
||||
intl.formatMessage(messages.validationHostnameRequired)
|
||||
),
|
||||
|
@@ -11,6 +11,7 @@ import { useIntl, defineMessages } from 'react-intl';
|
||||
const messages = defineMessages({
|
||||
createsonarr: 'Create New Sonarr Server',
|
||||
editsonarr: 'Edit Sonarr Server',
|
||||
validationNameRequired: 'You must provide a server name',
|
||||
validationHostnameRequired: 'You must provide a hostname/IP',
|
||||
validationPortRequired: 'You must provide a port',
|
||||
validationApiKeyRequired: 'You must provide an API key',
|
||||
@@ -73,6 +74,9 @@ const SonarrModal: React.FC<SonarrModalProps> = ({
|
||||
rootFolders: [],
|
||||
});
|
||||
const SonarrSettingsSchema = Yup.object().shape({
|
||||
name: Yup.string().required(
|
||||
intl.formatMessage(messages.validationNameRequired)
|
||||
),
|
||||
hostname: Yup.string().required(
|
||||
intl.formatMessage(messages.validationHostnameRequired)
|
||||
),
|
||||
|
Reference in New Issue
Block a user