fix: 修改校验信息

pull/79/head
zhengkunwang223 2022-12-20 23:15:32 +08:00 committed by zhengkunwang223
parent d58c459e81
commit 1787261727
11 changed files with 14 additions and 11 deletions

View File

@ -26,7 +26,7 @@
"envKey": "PANEL_DB_USER"
},
{
"type": "text",
"type": "password",
"labelZh": "数据库用户密码",
"labelEn": "Password",
"required": true,

View File

@ -9,7 +9,7 @@
"envKey": "MINIO_ROOT_USER"
},
{
"type": "text",
"type": "password",
"labelZh": "密码",
"labelEn": "Password",
"required": true,

View File

@ -1,7 +1,7 @@
{
"formFields": [
{
"type": "text",
"type": "password",
"labelZh": "Root用户密码",
"labelEn": "RootPassword",
"required": true,

View File

@ -1,7 +1,7 @@
{
"formFields": [
{
"type": "text",
"type": "password",
"labelZh": "Root用户密码",
"labelEn": "RootPassword",
"required": true,

View File

@ -10,12 +10,12 @@
"envKey": "PANEL_REDIS_HOST"
},
{
"type": "text",
"type": "password",
"labelZh": "密码",
"labelEn": "Password",
"required": true,
"default": "eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81",
"envKey": "PANEL_DB_ROOT_PASSWORD"
"envKey": "PANEL_DB_ROOT_PASSWORD"
},
{
"type": "number",

View File

@ -1,7 +1,7 @@
{
"formFields": [
{
"type": "text",
"type": "password",
"labelZh": "密码",
"labelEn": "Password",
"required": true,

View File

@ -1,7 +1,7 @@
{
"formFields": [
{
"type": "text",
"type": "password",
"labelZh": "密码",
"labelEn": "Password",
"required": true,

View File

@ -26,7 +26,7 @@
"envKey": "PANEL_DB_USER"
},
{
"type": "text",
"type": "password",
"labelZh": "数据库用户密码",
"labelEn": "Password",
"required": true,

View File

@ -26,7 +26,7 @@
"envKey": "PANEL_DB_USER"
},
{
"type": "text",
"type": "password",
"labelZh": "数据库用户密码",
"labelEn": "Password",
"required": true,

View File

@ -58,7 +58,7 @@ const checkLinuxName = (rule: any, value: any, callback: any) => {
if (value === '' || typeof value === 'undefined' || value == null) {
callback(new Error(i18n.global.t('commons.rule.linuxName')));
} else {
const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9_.]{0,30}$/;
const reg = /^[a-zA-Z0-9]{1}[a-zA-Z0-9_.-]{0,30}$/;
if (!reg.test(value) && value !== '') {
callback(new Error(i18n.global.t('commons.rule.linuxName')));
} else {

View File

@ -107,6 +107,9 @@ const handleParams = () => {
rules[p.envKey] = [Rules.requiredSelect];
} else {
rules[p.envKey] = [Rules.requiredInput];
if (p.envKey === 'PANEL_DB_NAME') {
rules[p.envKey].push(Rules.linuxName);
}
}
}
if (p.key) {