mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 16:29:17 +08:00
fix: 增加正整数正则校验
This commit is contained in:
parent
f24821abc8
commit
26dd672522
@ -131,12 +131,13 @@ export default {
|
|||||||
simpleName: 'Support English, numbers and _ length 1-30',
|
simpleName: 'Support English, numbers and _ length 1-30',
|
||||||
dbName: 'Support English, Chinese, numbers, .-, and _ length 1-16',
|
dbName: 'Support English, Chinese, numbers, .-, and _ length 1-16',
|
||||||
imageName: 'Support English, numbers, :/.-_, length 1-150',
|
imageName: 'Support English, numbers, :/.-_, length 1-150',
|
||||||
volumeName: 'Support English, numbers, .-_, length 1-30',
|
volumeName: 'Support English, numbers, .-_, length 2-30',
|
||||||
complexityPassword:
|
complexityPassword:
|
||||||
'Enter a password that is longer than eight characters and contains at least two letters, digits, and special characters',
|
'Enter a password that is longer than eight characters and contains at least two letters, digits, and special characters',
|
||||||
commonPassword: 'Please enter a password with more than 6 characters',
|
commonPassword: 'Please enter a password with more than 6 characters',
|
||||||
email: 'Email format error',
|
email: 'Email format error',
|
||||||
number: 'Please enter the correct number',
|
number: 'Please enter the correct number',
|
||||||
|
integer: 'Please enter the correct positive integer',
|
||||||
ip: 'Please enter the correct IP address',
|
ip: 'Please enter the correct IP address',
|
||||||
port: 'Please enter the correct port',
|
port: 'Please enter the correct port',
|
||||||
selectHelper: 'Please select the correct {0} file',
|
selectHelper: 'Please select the correct {0} file',
|
||||||
|
@ -135,12 +135,13 @@ export default {
|
|||||||
simpleName: '支持英文、数字、_,长度1-30',
|
simpleName: '支持英文、数字、_,长度1-30',
|
||||||
dbName: '支持英文、中文、数字、.-_,长度1-16',
|
dbName: '支持英文、中文、数字、.-_,长度1-16',
|
||||||
imageName: '支持英文、数字、:/.-_,长度1-150',
|
imageName: '支持英文、数字、:/.-_,长度1-150',
|
||||||
volumeName: '支持英文、数字、.-和_,长度1-30',
|
volumeName: '支持英文、数字、.-和_,长度2-30',
|
||||||
complexityPassword: '请输入长度大于 8 位且包含字母、数字、特殊字符至少两项的密码组合',
|
complexityPassword: '请输入长度大于 8 位且包含字母、数字、特殊字符至少两项的密码组合',
|
||||||
commonPassword: '请输入 6 位以上长度密码',
|
commonPassword: '请输入 6 位以上长度密码',
|
||||||
linuxName: '长度1-30,名称不能含有{0}等符号',
|
linuxName: '长度1-30,名称不能含有{0}等符号',
|
||||||
email: '请输入正确的邮箱',
|
email: '请输入正确的邮箱',
|
||||||
number: '请输入正确的数字',
|
number: '请输入正确的数字',
|
||||||
|
integer: '请输入正确的正整数',
|
||||||
ip: '请输入正确的 IP 地址',
|
ip: '请输入正确的 IP 地址',
|
||||||
port: '请输入正确的端口,1-65535',
|
port: '请输入正确的端口,1-65535',
|
||||||
selectHelper: '请选择正确的 {0} 文件',
|
selectHelper: '请选择正确的 {0} 文件',
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('setting.storeDays')"
|
:label="$t('setting.storeDays')"
|
||||||
:rules="[Rules.number, checkNumberRange(1, 30)]"
|
:rules="[Rules.integerNumber, checkNumberRange(1, 30)]"
|
||||||
prop="monitorStoreDays"
|
prop="monitorStoreDays"
|
||||||
>
|
>
|
||||||
<el-input clearable v-model.number="form.monitorStoreDays">
|
<el-input clearable v-model.number="form.monitorStoreDays">
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('setting.sessionTimeout')"
|
:label="$t('setting.sessionTimeout')"
|
||||||
:rules="[Rules.number, checkNumberRange(300, 864000)]"
|
:rules="[Rules.integerNumber, checkNumberRange(300, 864000)]"
|
||||||
prop="sessionTimeout"
|
prop="sessionTimeout"
|
||||||
>
|
>
|
||||||
<el-input v-model.number="form.sessionTimeout">
|
<el-input v-model.number="form.sessionTimeout">
|
||||||
@ -254,6 +254,9 @@ const onSave = async (formEl: FormInstance | undefined, key: string, val: any) =
|
|||||||
globalStore.setLogStatus(false);
|
globalStore.setLogStatus(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (param.key === 'Language') {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
MsgSuccess(i18n.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.t('commons.msg.operationSuccess'));
|
||||||
search();
|
search();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user