libs/web: introduce "uciname" datatype for cbi validation
[project/luci.git] / libs / web / htdocs / luci-static / resources / cbi.js
index b4137d4..8e2f62a 100644 (file)
@@ -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);
+       }
 };