1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

feat: 修改校验

This commit is contained in:
zhengkunwang223 2022-12-23 11:12:07 +08:00 committed by zhengkunwang223
parent f7f7fff84d
commit be974ad0a8
3 changed files with 2 additions and 12 deletions

View File

@ -12,13 +12,3 @@ func getTxAndContext() (tx *gorm.DB, ctx context.Context) {
ctx = context.WithValue(context.Background(), constant.DB, tx)
return
}
func getTxByContext(ctx context.Context) (*gorm.DB, context.Context) {
tx, ok := ctx.Value(constant.DB).(*gorm.DB)
if ok {
return tx, ctx
}
tx = global.DB.Begin()
ctx = context.WithValue(context.Background(), constant.DB, tx)
return tx, ctx
}

View File

@ -108,7 +108,7 @@ export default {
imageName: '支持英文中文数字:.-_,长度1-30',
complexityPassword: '请输入 8 位以上必须含有字母数字特殊符号的密码',
commonPassword: '请输入 6 位以上长度密码',
linuxName: '支持英文数字._长度1-30',
linuxName: '支持英文数字._-长度1-30',
email: '请输入正确的邮箱',
number: '请输入正确的数字',
ip: '请输入正确的 IP 地址',

View File

@ -46,7 +46,7 @@ const installData = ref<InstallRrops>({
let open = ref(false);
let form = ref<{ [key: string]: any }>({});
let rules = ref<FormRules>({
NAME: [Rules.simpleName],
NAME: [Rules.linuxName],
});
let loading = false;
const paramForm = ref<FormInstance>();