libs/web: allow '!' and '.' symbols in phonedigit datatype
[project/luci.git] / libs / web / htdocs / luci-static / resources / cbi.js
index a30533b..02814a5 100644 (file)
@@ -299,7 +299,7 @@ var cbi_validators = {
        },
        'phonedigit': function()
        {
-               return (this.match(/^[0-9\*#]+$/) != null);
+               return (this.match(/^[0-9\*#!\.]+$/) != null);
        }
 };
 
@@ -335,7 +335,7 @@ function cbi_d_checkvalue(target, ref) {
        if (!t) {
                var tl = document.getElementsByName(target);
 
-               if( tl.length > 0 && tl[0].type == 'radio' )
+               if( tl.length > 0 && (tl[0].type == 'radio' || tl[0].type == 'checkbox'))
                        for( var i = 0; i < tl.length; i++ )
                                if( tl[i].checked ) {
                                        value = tl[i].value;