libs/web: allow '!' and '.' symbols in phonedigit datatype
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 5 Feb 2013 13:15:48 +0000 (13:15 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 5 Feb 2013 13:15:48 +0000 (13:15 +0000)
libs/web/htdocs/luci-static/resources/cbi.js
libs/web/luasrc/cbi/datatypes.lua

index e89658d..02814a5 100644 (file)
@@ -299,7 +299,7 @@ var cbi_validators = {
        },
        'phonedigit': function()
        {
        },
        'phonedigit': function()
        {
-               return (this.match(/^[0-9\*#]+$/) != null);
+               return (this.match(/^[0-9\*#!\.]+$/) != null);
        }
 };
 
        }
 };
 
index 32530c4..c5f4ec0 100644 (file)
@@ -341,5 +341,5 @@ function maxlength(val, max)
 end
 
 function phonedigit(val)
 end
 
 function phonedigit(val)
-       return (val:match("^[0-9\*#]+$") ~= nil)
+       return (val:match("^[0-9\*#!%.]+$") ~= nil)
 end
 end