mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 远程应用名称不能包含()
This commit is contained in:
@@ -53,13 +53,27 @@ export const matchAlphanumericUnderscore = {
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
|
||||
// 不能包含()
|
||||
export const MatchExcludeParenthesis = {
|
||||
validator: (rule, value, callback) => {
|
||||
value = value?.trim()
|
||||
if (!/^[^()]*$/.test(value)) {
|
||||
callback(new Error(i18n.t('common.notParenthesis')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
|
||||
export default {
|
||||
IpCheck,
|
||||
Required,
|
||||
RequiredChange,
|
||||
EmailCheck,
|
||||
specialEmojiCheck,
|
||||
matchAlphanumericUnderscore
|
||||
matchAlphanumericUnderscore,
|
||||
MatchExcludeParenthesis
|
||||
}
|
||||
|
||||
export const JsonRequired = {
|
||||
|
||||
@@ -867,6 +867,7 @@
|
||||
"SecretKey": "Secret Key",
|
||||
"NotSpecialEmoji": "No special emoji allowed",
|
||||
"notAlphanumericUnderscore": "Only numbers, letters and underscores can be entered",
|
||||
"notParenthesis": "Not contain ( )",
|
||||
"Task": "Task",
|
||||
"Cas": "CAS",
|
||||
"Invalid": "Invalid",
|
||||
|
||||
@@ -804,6 +804,7 @@
|
||||
"FormatError": "フォーマットエラー",
|
||||
"NotSpecialEmoji": "特殊な表情記号の入力は許可されていません",
|
||||
"notAlphanumericUnderscore": "数字、文字、アンダースコアのみ入力可能",
|
||||
"notParenthesis": "含まない ( )",
|
||||
"WeekCronSelect": {
|
||||
"Monday": "月曜日",
|
||||
"Tuesday": "火曜日",
|
||||
|
||||
@@ -838,6 +838,7 @@
|
||||
"FormatError": "格式错误",
|
||||
"NotSpecialEmoji": "不允许输入特殊表情符号",
|
||||
"notAlphanumericUnderscore": "只能输入字母、数字、下划线",
|
||||
"notParenthesis": "不能包含 ( )",
|
||||
"WeekCronSelect": {
|
||||
"Monday": "星期一",
|
||||
"Tuesday": "星期二",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<script>
|
||||
import BaseAssetCreateUpdate from '@/views/assets/Asset/AssetCreateUpdate/BaseAssetCreateUpdate'
|
||||
import { Required, MatchExcludeParenthesis } from '@/components/Form/DataForm/rules'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -19,6 +20,9 @@ export default {
|
||||
[this.$t('assets.Account'), ['auto_create_accounts', 'accounts_create_amount']]
|
||||
],
|
||||
addFieldsMeta: {
|
||||
name: {
|
||||
rules: [Required, MatchExcludeParenthesis]
|
||||
},
|
||||
accounts_create_amount: {
|
||||
hidden: (formValue) => !formValue['auto_create_accounts']
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user