diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-30 18:12:39 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-10-30 18:12:39 +0000 |
commit | 46222415352ac3b5a99570178a4ed46b759c2e82 (patch) | |
tree | fa3ca0e26071a64816e9aa10fcfebefb62e38714 /libs/web/htdocs/luci-static | |
parent | fc5b9e27f0bdc9483f88f368bf3a3090c63bbd39 (diff) |
libs/web: introduce "uciname" datatype for cbi validation
Diffstat (limited to 'libs/web/htdocs/luci-static')
-rw-r--r-- | libs/web/htdocs/luci-static/resources/cbi.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js index b4137d4865..8e2f62aea2 100644 --- a/libs/web/htdocs/luci-static/resources/cbi.js +++ b/libs/web/htdocs/luci-static/resources/cbi.js @@ -152,6 +152,10 @@ var cbi_validators = { return (v.length == 5) || (v.length == 13); }, + 'uciname': function(v) + { + return (v.match(/^[a-zA-Z0-9_]+$/) != null); + } }; |