fix(usage-script): add input validation and boundary checks (#208)
- Backend: validate auto-query interval ≤ 1440 minutes (24 hours) - Frontend: add number input sanitization and blur validation - Add user-friendly error messages for invalid inputs - Support auto-clamping to valid ranges with toast notifications
This commit is contained in:
@@ -378,8 +378,14 @@
|
||||
"queryFailedMessage": "查询失败",
|
||||
"queryScript": "查询脚本(JavaScript)",
|
||||
"timeoutSeconds": "超时时间(秒)",
|
||||
"timeoutHint": "范围: 2-30 秒",
|
||||
"timeoutMustBeInteger": "超时时间必须为整数,小数部分已忽略",
|
||||
"timeoutCannotBeNegative": "超时时间不能为负数",
|
||||
"autoQueryInterval": "自动查询间隔(分钟)",
|
||||
"autoQueryIntervalHint": "0 表示不自动查询,建议设置 5-60 分钟",
|
||||
"intervalMustBeInteger": "自动查询间隔必须为整数,小数部分已忽略",
|
||||
"intervalCannotBeNegative": "自动查询间隔不能为负数",
|
||||
"intervalAdjusted": "自动查询间隔已调整为 {{value}} 分钟",
|
||||
"scriptHelp": "脚本编写说明:",
|
||||
"configFormat": "配置格式:",
|
||||
"commentOptional": "可选",
|
||||
|
||||
Reference in New Issue
Block a user