Browse Source

add verify tenant name cannot contain special characters.

pull/3/MERGE
zhuangchong 4 years ago
parent
commit
ec81f46853
  1. 7
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue
  2. 1
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  3. 1
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

7
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue

@ -146,6 +146,13 @@
this.$message.warning(`${i18n.$t('Please enter name')}`) this.$message.warning(`${i18n.$t('Please enter name')}`)
return false return false
} }
// Verify tenant name cannot contain special characters
let isSpecial = /[~#^$@%&!*()<>《》:;'"{}【】 ]/gi
if (isSpecial.test(this.tenantName)) {
this.$message.warning(`${i18n.$t('Please enter tenant name without special characters')}`)
return false
}
return true return true
}, },
_submit () { _submit () {

1
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js

@ -175,6 +175,7 @@ export default {
'Please select a queue': 'default is tenant association queue', 'Please select a queue': 'default is tenant association queue',
'Please enter the tenant code in English': 'Please enter the tenant code in English', 'Please enter the tenant code in English': 'Please enter the tenant code in English',
'Please enter tenant code in English': 'Please enter tenant code in English', 'Please enter tenant code in English': 'Please enter tenant code in English',
'Please enter tenant name without special characters': 'Please enter tenant name without special characters',
'Edit User': 'Edit User', 'Edit User': 'Edit User',
Tenant: 'Tenant', Tenant: 'Tenant',
Email: 'Email', Email: 'Email',

1
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -178,6 +178,7 @@ export default {
Queue: '队列', Queue: '队列',
'Please enter the tenant code in English': '请输入租户编码只允许英文', 'Please enter the tenant code in English': '请输入租户编码只允许英文',
'Please enter tenant code in English': '请输入英文租户编码', 'Please enter tenant code in English': '请输入英文租户编码',
'Please enter tenant name without special characters': '请输入不包含特殊字符的租户名称',
'Edit User': '编辑用户', 'Edit User': '编辑用户',
Tenant: '租户', Tenant: '租户',
Email: '邮件', Email: '邮件',

Loading…
Cancel
Save