fix: validate duration field to not be negative or decimal
This commit is contained in:
1 parent
28a4d18792
commit
9cd819dc5e
1 file changed
+1
-1
@@ -131,7 +131,7 @@ const maintenanceWindowValidation = joi.object({
|
||||
repeat: joi.string(),
|
||||
startDate: joi.custom(dayjsValidator, "Day.js date validation"),
|
||||
startTime: joi.custom(dayjsValidator, "Day.js date validation"),
|
||||
duration: joi.number(),
|
||||
duration: joi.number().integer().min(0),
|
||||
durationUnit: joi.string(),
|
||||
name: joi.string(),
|
||||
monitors: joi.array().min(1),
|
||||
|
||||
Reference in new issue
Block a user