This commit is contained in:
Lionel Ringenbach 2026-04-05 01:16:08 +00:00 committed by GitHub
commit 53ac35792d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View file

@ -52,7 +52,7 @@ export default function BasicInfoSection() {
{...register('title', {
required: localize('com_ui_field_required'),
pattern: {
value: /^[a-zA-Z0-9 ]+$/,
value: /^[-\p{L}\p{N} '']+$/u,
message: localize('com_ui_mcp_title_invalid'),
},
})}

View file

@ -1155,7 +1155,7 @@
"com_ui_mcp_servers_allow_share": "Allow users to share MCP servers",
"com_ui_mcp_servers_allow_share_public": "Allow users to share MCP servers publicly",
"com_ui_mcp_servers_allow_use": "Allow users to use MCP servers",
"com_ui_mcp_title_invalid": "Title can only contain letters, numbers, and spaces",
"com_ui_mcp_title_invalid": "Title can only contain letters, numbers, spaces, apostrophes, and hyphens",
"com_ui_mcp_tool_options": "Tool Options",
"com_ui_mcp_transport": "Transport",
"com_ui_mcp_type_sse": "SSE",

View file

@ -3,10 +3,13 @@ import { TokenExchangeMethodEnum } from './types/agents';
import { extractEnvVariable } from './utils';
const BaseOptionsSchema = z.object({
/** Display name for the MCP server - only letters, numbers, and spaces allowed */
/** Display name for the MCP server */
title: z
.string()
.regex(/^[a-zA-Z0-9 ]+$/, 'Title can only contain letters, numbers, and spaces')
.regex(
/^[\p{L}\p{N} ''\-]+$/u,
'Title can only contain letters, numbers, spaces, apostrophes, and hyphens',
)
.optional(),
/** Description of the MCP server */
description: z.string().optional(),