libs/web: implement new phone digit datatype, useful for VoIP related config screens
[project/luci.git] / libs / web / htdocs / luci-static / resources / cbi.js
index 7171574..8ced441 100644 (file)
@@ -269,6 +269,10 @@ var cbi_validators = {
                                return false;
 
                return true;
+       },
+       'phonedigit': function()
+       {
+               return (this.match(/^[0-9\*#]+$/) != null);
        }
 };