diff --git a/frontend/src/pages/Deploy/Deployment/List/components/DeploymentConfigModal.tsx b/frontend/src/pages/Deploy/Deployment/List/components/DeploymentConfigModal.tsx index dd2841a3..c7df593c 100644 --- a/frontend/src/pages/Deploy/Deployment/List/components/DeploymentConfigModal.tsx +++ b/frontend/src/pages/Deploy/Deployment/List/components/DeploymentConfigModal.tsx @@ -226,9 +226,14 @@ const DeploymentConfigModal: React.FC = ({ key: { type: 'string', 'x-decorator': 'FormItem', + 'x-validator': { + pattern: '^[a-zA-Z][a-zA-Z0-9_]*$', + message: '键名只能包含字母、数字和下划线,且必须以字母开头' + }, 'x-component': 'Input', 'x-component-props': { - placeholder: '请输入键' + placeholder: '请输入键', + allowClear: true } } }