diff options
author | Manuel Munz <freifunk@somakoma.de> | 2012-11-10 20:55:50 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2012-11-10 20:55:50 +0000 |
commit | 7b7030629c4d55557b368a292d7f3e3d14b1923b (patch) | |
tree | e60dfd01f3e9dff541ab6ad14fda9c2f02aa9667 /applications/luci-ddns/luasrc/model | |
parent | 4e04e353fe91107d27046f93d63aa9aa92418ce8 (diff) |
Add some more datatype checks, patch by Eugene C., #499
Diffstat (limited to 'applications/luci-ddns/luasrc/model')
-rw-r--r-- | applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua index 42fb4a61dc..e477a245ec 100644 --- a/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua +++ b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua @@ -112,14 +112,19 @@ else end -s:option(Value, "check_interval", - translate("Check for changed IP every")).default = 10 +ci = s:option(Value, "check_interval", translate("Check for changed IP every")) +ci.datatype = "and(uinteger,min(1))" +ci.default = 10 + unit = s:option(ListValue, "check_unit", translate("Check-time unit")) unit.default = "minutes" unit:value("minutes", translate("min")) unit:value("hours", translate("h")) -s:option(Value, "force_interval", translate("Force update every")).default = 72 +fi = s:option(Value, "force_interval", translate("Force update every")) +fi.datatype = "and(uinteger,min(1))" +fi.default = 72 + unit = s:option(ListValue, "force_unit", translate("Force-time unit")) unit.default = "hours" unit:value("minutes", translate("min")) |