summaryrefslogtreecommitdiffhomepage
path: root/libs/web/htdocs
diff options
context:
space:
mode:
Diffstat (limited to 'libs/web/htdocs')
-rw-r--r--libs/web/htdocs/luci-static/resources/cbi.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js
index 1cd49bc65..1e751d47e 100644
--- a/libs/web/htdocs/luci-static/resources/cbi.js
+++ b/libs/web/htdocs/luci-static/resources/cbi.js
@@ -219,6 +219,14 @@ var cbi_validators = {
return (val <= max);
return false;
+ },
+
+ 'neg': function(v, args)
+ {
+ if (args[0] && typeof cbi_validators[args[0]] == "function")
+ return cbi_validators[args[0]](v.replace(/^\s*!\s*/, ''));
+
+ return false;
}
};