mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-26 06:58:53 +00:00
perf: add re
This commit is contained in:
@@ -39,12 +39,26 @@ export const specialEmojiCheck = {
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
|
||||
// 只能输入字母、数字、下划线
|
||||
export const matchAlphanumericUnderscore = {
|
||||
validator: (rule, value, callback) => {
|
||||
value = value?.trim()
|
||||
if (!/^[a-zA-Z0-9_]+$/.test(value)) {
|
||||
callback(new Error(i18n.t('common.notAlphanumericUnderscore')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
|
||||
export default {
|
||||
IpCheck,
|
||||
Required,
|
||||
RequiredChange,
|
||||
EmailCheck,
|
||||
specialEmojiCheck
|
||||
specialEmojiCheck,
|
||||
matchAlphanumericUnderscore
|
||||
}
|
||||
|
||||
export const JsonRequired = {
|
||||
|
@@ -753,6 +753,7 @@
|
||||
"CACertificate": "CA Certificate",
|
||||
"SecretKey": "Secret Key",
|
||||
"NotSpecialEmoji": "No special emoji allowed",
|
||||
"notAlphanumericUnderscore": "Only numbers, letters and underscores can be entered",
|
||||
"Task": "Task",
|
||||
"Cas": "CAS",
|
||||
"Invalid": "Invalid",
|
||||
|
@@ -692,6 +692,7 @@
|
||||
"time_period": "時間帯",
|
||||
"FormatError": "フォーマットエラー",
|
||||
"NotSpecialEmoji": "特殊な表情記号の入力は許可されていません",
|
||||
"notAlphanumericUnderscore": "数字、文字、アンダースコアのみ入力可能",
|
||||
"WeekCronSelect": {
|
||||
"Monday": "月曜日",
|
||||
"Tuesday": "火曜日",
|
||||
|
@@ -704,6 +704,7 @@
|
||||
"time_period": "时段",
|
||||
"FormatError": "格式错误",
|
||||
"NotSpecialEmoji": "不允许输入特殊表情符号",
|
||||
"notAlphanumericUnderscore": "只能输入字母、数字、下划线",
|
||||
"WeekCronSelect": {
|
||||
"Monday": "星期一",
|
||||
"Tuesday": "星期二",
|
||||
|
Reference in New Issue
Block a user