mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-26 06:09:57 +00:00
fix: #478
This commit is contained in:
parent
6d612f42a8
commit
9aaf3ff5d8
@ -13,8 +13,7 @@ const NotifyChannelEditFormBarkFields = () => {
|
|||||||
.nullish(),
|
.nullish(),
|
||||||
deviceKey: z
|
deviceKey: z
|
||||||
.string({ message: t("settings.notification.channel.form.bark_device_key.placeholder") })
|
.string({ message: t("settings.notification.channel.form.bark_device_key.placeholder") })
|
||||||
.min(1, t("settings.notification.channel.form.bark_device_key.placeholder"))
|
.nonempty(t("settings.notification.channel.form.bark_device_key.placeholder")),
|
||||||
.max(256, t("common.errmsg.string_max", { max: 256 })),
|
|
||||||
});
|
});
|
||||||
const formRule = createSchemaFieldRule(formSchema);
|
const formRule = createSchemaFieldRule(formSchema);
|
||||||
|
|
||||||
|
@ -9,12 +9,10 @@ const NotifyChannelEditFormDingTalkFields = () => {
|
|||||||
const formSchema = z.object({
|
const formSchema = z.object({
|
||||||
accessToken: z
|
accessToken: z
|
||||||
.string({ message: t("settings.notification.channel.form.dingtalk_access_token.placeholder") })
|
.string({ message: t("settings.notification.channel.form.dingtalk_access_token.placeholder") })
|
||||||
.min(1, t("settings.notification.channel.form.dingtalk_access_token.placeholder"))
|
.nonempty(t("settings.notification.channel.form.dingtalk_access_token.placeholder")),
|
||||||
.max(256, t("common.errmsg.string_max", { max: 256 })),
|
|
||||||
secret: z
|
secret: z
|
||||||
.string({ message: t("settings.notification.channel.form.dingtalk_secret.placeholder") })
|
.string({ message: t("settings.notification.channel.form.dingtalk_secret.placeholder") })
|
||||||
.min(1, t("settings.notification.channel.form.dingtalk_secret.placeholder"))
|
.nonempty(t("settings.notification.channel.form.dingtalk_secret.placeholder")),
|
||||||
.max(64, t("common.errmsg.string_max", { max: 64 })),
|
|
||||||
});
|
});
|
||||||
const formRule = createSchemaFieldRule(formSchema);
|
const formRule = createSchemaFieldRule(formSchema);
|
||||||
|
|
||||||
|
@ -7,10 +7,7 @@ const NotifyChannelEditFormWeComFields = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const formSchema = z.object({
|
const formSchema = z.object({
|
||||||
webhookUrl: z
|
webhookUrl: z.string({ message: t("settings.notification.channel.form.wecom_webhook_url.placeholder") }).url({ message: t("common.errmsg.url_invalid") }),
|
||||||
.string({ message: t("settings.notification.channel.form.wecom_webhook_url.placeholder") })
|
|
||||||
.min(1, t("settings.notification.channel.form.wecom_webhook_url.placeholder"))
|
|
||||||
.url({ message: t("common.errmsg.url_invalid") }),
|
|
||||||
});
|
});
|
||||||
const formRule = createSchemaFieldRule(formSchema);
|
const formRule = createSchemaFieldRule(formSchema);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user