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 e89658dc961b63db64d423e2b8d99a5245060bce..02814a54282ff628d2bdbf4f72b3788f99b00e8d 100644 (file)
@@ -299,7 +299,7 @@ var cbi_validators = {
        },
        'phonedigit': function()
        {
-               return (this.match(/^[0-9\*#]+$/) != null);
+               return (this.match(/^[0-9\*#!\.]+$/) != null);
        }
 };
 
index 32530c465ad9f1816db3fdba1b880b2dca27047a..c5f4ec0f0dfe0f3eac63c0ed0e1606a1ea953a7b 100644 (file)
@@ -341,5 +341,5 @@ function maxlength(val, max)
 end
 
 function phonedigit(val)
-       return (val:match("^[0-9\*#]+$") ~= nil)
+       return (val:match("^[0-9\*#!%.]+$") ~= nil)
 end