mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-10 14:39:50 +00:00
Merge pull request #328 from fudiwei/bugfix/tencentcloud-deploy-config-not-saving
bugfix #324
This commit is contained in:
commit
6ac7a51ce0
@ -44,9 +44,7 @@ const DeployToTencentCLB = () => {
|
|||||||
}),
|
}),
|
||||||
loadbalancerId: z.string().min(1, t("domain.deployment.form.tencent_clb_loadbalancer_id.placeholder")),
|
loadbalancerId: z.string().min(1, t("domain.deployment.form.tencent_clb_loadbalancer_id.placeholder")),
|
||||||
listenerId: z.string().optional(),
|
listenerId: z.string().optional(),
|
||||||
domain: z.string().regex(/^$|^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/, {
|
domain: z.string().optional(),
|
||||||
message: t("common.errmsg.domain_invalid"),
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
.refine(
|
.refine(
|
||||||
(data) => {
|
(data) => {
|
||||||
@ -63,10 +61,20 @@ const DeployToTencentCLB = () => {
|
|||||||
path: ["listenerId"],
|
path: ["listenerId"],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.refine((data) => (data.resourceType === "ruledomain" ? !!data.domain?.trim() : true), {
|
.refine(
|
||||||
message: t("domain.deployment.form.tencent_clb_ruledomain.placeholder"),
|
(data) => {
|
||||||
path: ["domain"],
|
switch (data.resourceType) {
|
||||||
});
|
case "ssl-deploy":
|
||||||
|
case "ruledomain":
|
||||||
|
return !!data.domain?.trim() && /^$|^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(data.domain);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
message: t("domain.deployment.form.tencent_clb_ruledomain.placeholder"),
|
||||||
|
path: ["domain"],
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const res = formSchema.safeParse(config.config);
|
const res = formSchema.safeParse(config.config);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user