summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/web/luasrc')
-rw-r--r--libs/web/luasrc/cbi/datatypes.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/web/luasrc/cbi/datatypes.lua b/libs/web/luasrc/cbi/datatypes.lua
index 53a34547ba..a9aba95493 100644
--- a/libs/web/luasrc/cbi/datatypes.lua
+++ b/libs/web/luasrc/cbi/datatypes.lua
@@ -204,3 +204,7 @@ function device( val, seen )
return false
end
+
+function uciname(val)
+ return (val:match("^[a-zA-Z0-9_]+$") != nil)
+end