mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-16 20:25:44 +08:00
fix: support Chinese cron log names (#3068)
This commit is contained in:
+2
-2
@@ -94,8 +94,8 @@ const messages: Record<string, Record<string, string>> = {
|
||||
'日志设置为忽略': 'Log set to ignore',
|
||||
'定时规则不能为空': 'Schedule rule cannot be empty',
|
||||
'无效的定时规则': 'Invalid schedule rule',
|
||||
'日志名称只能包含字母、数字、下划线和连字符':
|
||||
'Log name can only contain letters, numbers, underscores, and hyphens',
|
||||
'日志名称只能包含中文、字母、数字、下划线、连字符、点和路径分隔符':
|
||||
'Log name can only contain Chinese characters, letters, numbers, underscores, hyphens, dots, and path separators',
|
||||
'日志名称不能超过100个字符': 'Log name cannot exceed 100 characters',
|
||||
'错误的用户名密码,请重试': 'Incorrect username or password, please try again',
|
||||
'该 IP 已被列入黑名单': 'This IP address has been blocked',
|
||||
|
||||
@@ -75,7 +75,7 @@ export const commonCronSchema = {
|
||||
}
|
||||
|
||||
if (
|
||||
!/^(?!.*(?:^|\/)\.{1,2}(?:\/|$))(?:\/)?(?:[\w.-]+\/)*[\w.-]+\/?$/.test(
|
||||
!/^(?!.*(?:^|\/)\.{1,2}(?:\/|$))(?:\/)?(?:[\w\p{Script=Han}.-]+\/)*[\w\p{Script=Han}.-]+\/?$/u.test(
|
||||
value,
|
||||
)
|
||||
) {
|
||||
@@ -87,7 +87,7 @@ export const commonCronSchema = {
|
||||
return value;
|
||||
})
|
||||
.messages({
|
||||
'string.pattern.base': '日志名称只能包含字母、数字、下划线和连字符',
|
||||
'string.pattern.base': '日志名称只能包含中文、字母、数字、下划线、连字符、点和路径分隔符',
|
||||
'string.max': '日志名称不能超过100个字符',
|
||||
'string.unsafePath': '绝对路径必须在日志目录内或使用 /dev/null',
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user