Add validation to non-negative int config options

This commit is contained in:
Daniel
2021-02-23 22:45:08 +01:00
parent d13cfb1bb4
commit b60427c68b
2 changed files with 2 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ func registerConfig() error {
config.UnitAnnotation: "seconds",
config.CategoryAnnotation: "General",
},
ValidationRegex: `^[1-9][0-9]{1,5}?$`,
})
if err != nil {
return err