diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index d42be7c..9b0ffc6 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -732,7 +732,7 @@ const local: any = { username:'Device username(optional)', password:'Device password(optional)', snFormatError:'A-Z or 13-bit characters from 0-9', - nameFormatError:'Cannot start with space, +、-、@, = characters,cannot end with space, the length is between 1-128', + nameFormatError:"Cannot start with space, +、-、{test}, = characters,cannot end with space, the length is between 1-128", forgetConfirm:'Are you sure you want to forget your device?', restartConfirm:'Are you sure you want to restart your device?', led:'LED', diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 734b319..d8b0e44 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -732,7 +732,7 @@ const local:any = { username:'设备用户名', password:'密码', snFormatError:'A-Z 或 0-9 的 13 位字符', - nameFormatError:'不能以空格、+、-、@、=字符开头,不能以空格结尾,长度在 1-128 之间', + nameFormatError:'不能以空格、+、-、{test}、=字符开头,不能以空格结尾,长度在 1-128 之间', forgetConfirm:'确认要忘记设备吗?', restartConfirm:'确认要重启设备吗?', led:'LED', diff --git a/src/views/device/apdevice/index.vue b/src/views/device/apdevice/index.vue index 68d4b09..a7b09ba 100644 --- a/src/views/device/apdevice/index.vue +++ b/src/views/device/apdevice/index.vue @@ -555,14 +555,14 @@ const addDeviceRules = { message: t('page.apdevice.snFormatError'), trigger: 'blur' } - ] as Rule[], + ] , name: [ { pattern: /^[^ \+\-\@\=]$|^[^ \+\-\@\=].{0,126}[^ ]$/, - message: t('page.apdevice.nameFormatError'), + message: t('page.apdevice.nameFormatError', { test: '@' }), trigger: 'blur' } - ] as Rule[] + ] }; // 添加设备的表单数据