创建编辑工作空间时校验特殊字符
This commit is contained in:
parent
7421b4b89d
commit
9ec6dd2170
|
@ -438,7 +438,13 @@
|
|||
rules: {
|
||||
name: [
|
||||
{required: true, message: this.$t('workspace.input_name'), trigger: 'blur'},
|
||||
{min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'}
|
||||
{min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'},
|
||||
{
|
||||
required: true,
|
||||
pattern: /^(?!-)(?!.*?-$)[a-zA-Z0-9\u4e00-\u9fa5-]+$/,
|
||||
message: this.$t('workspace.special_characters_are_not_supported'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
organizationId: [
|
||||
{required: true, message: this.$t('organization.select_organization'), trigger: ['blur']}
|
||||
|
|
|
@ -102,6 +102,7 @@ export default {
|
|||
'please_select_a_workspace_first': 'Please select a workspace first!',
|
||||
'none': 'None Workspace',
|
||||
'select': 'Select Workspace',
|
||||
'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')',
|
||||
},
|
||||
organization: {
|
||||
'create': 'Create Organization',
|
||||
|
|
|
@ -101,6 +101,7 @@ export default {
|
|||
'please_select_a_workspace_first': '请先选择工作空间!',
|
||||
'none': '无工作空间',
|
||||
'select': '选择工作空间',
|
||||
'special_characters_are_not_supported': '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)',
|
||||
},
|
||||
organization: {
|
||||
'create': '创建组织',
|
||||
|
|
|
@ -93,6 +93,7 @@ export default {
|
|||
'please_select_a_workspace_first': '請先選擇工作空間! ',
|
||||
'none': '無工作空間',
|
||||
'select': '選擇工作空間',
|
||||
'special_characters_are_not_supported': '格式錯誤(不支持特殊字符,且不能以\'-\'開頭結尾)',
|
||||
},
|
||||
organization: {
|
||||
'create': '創建組織',
|
||||
|
|
Loading…
Reference in New Issue