mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
feat: 修改校验
This commit is contained in:
parent
f7f7fff84d
commit
be974ad0a8
@ -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
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ export default {
|
||||
imageName: '支持英文、中文、数字、:.-_,长度1-30',
|
||||
complexityPassword: '请输入 8 位以上、必须含有字母、数字、特殊符号的密码',
|
||||
commonPassword: '请输入 6 位以上长度密码',
|
||||
linuxName: '支持英文、数字、._长度1-30',
|
||||
linuxName: '支持英文、数字、._-长度1-30',
|
||||
email: '请输入正确的邮箱',
|
||||
number: '请输入正确的数字',
|
||||
ip: '请输入正确的 IP 地址',
|
||||
|
@ -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>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user