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": "Query failed",
|
||||
"queryScript": "Query script (JavaScript)",
|
||||
"timeoutSeconds": "Timeout (seconds)",
|
||||
"timeoutHint": "Range: 2-30 seconds",
|
||||
"timeoutMustBeInteger": "Timeout must be an integer, decimal part ignored",
|
||||
"timeoutCannotBeNegative": "Timeout cannot be negative",
|
||||
"autoQueryInterval": "Auto Query Interval (minutes)",
|
||||
"autoQueryIntervalHint": "0 to disable, recommend 5-60 minutes",
|
||||
"intervalMustBeInteger": "Interval must be an integer, decimal part ignored",
|
||||
"intervalCannotBeNegative": "Interval cannot be negative",
|
||||
"intervalAdjusted": "Interval adjusted to {{value}} minutes",
|
||||
"scriptHelp": "Script writing instructions:",
|
||||
"configFormat": "Configuration format:",
|
||||
"commentOptional": "optional",
|
||||
|
||||
Reference in New Issue
Block a user