summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-qos/luasrc/model/cbi/qos/qosmini.lua
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2012-11-10 20:55:50 +0000
committerManuel Munz <freifunk@somakoma.de>2012-11-10 20:55:50 +0000
commit7b7030629c4d55557b368a292d7f3e3d14b1923b (patch)
treee60dfd01f3e9dff541ab6ad14fda9c2f02aa9667 /applications/luci-qos/luasrc/model/cbi/qos/qosmini.lua
parent4e04e353fe91107d27046f93d63aa9aa92418ce8 (diff)
Add some more datatype checks, patch by Eugene C., #499
Diffstat (limited to 'applications/luci-qos/luasrc/model/cbi/qos/qosmini.lua')
-rw-r--r--applications/luci-qos/luasrc/model/cbi/qos/qosmini.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/applications/luci-qos/luasrc/model/cbi/qos/qosmini.lua b/applications/luci-qos/luasrc/model/cbi/qos/qosmini.lua
index 9ffefec4f1..0c5766f342 100644
--- a/applications/luci-qos/luasrc/model/cbi/qos/qosmini.lua
+++ b/applications/luci-qos/luasrc/model/cbi/qos/qosmini.lua
@@ -21,8 +21,12 @@ m = Map("qos")
s = m:section(NamedSection, "wan", "interface", translate("Internet Connection"))
s:option(Flag, "enabled", translate("Quality of Service"))
-s:option(Value, "download", translate("Downlink"), "kbit/s")
-s:option(Value, "upload", translate("Uplink"), "kbit/s")
+
+dl = s:option(Value, "download", translate("Downlink"), "kbit/s")
+dl.datatype = "and(uinteger,min(1))"
+
+ul = s:option(Value, "upload", translate("Uplink"), "kbit/s")
+ul.datatype = "and(uinteger,min(1))"
s = m:section(TypedSection, "classify")
s.template = "cbi/tblsection"