luci-0.10: Merge r6887
authorManuel Munz <freifunk@somakoma.de>
Sat, 12 Feb 2011 19:41:38 +0000 (19:41 +0000)
committerManuel Munz <freifunk@somakoma.de>
Sat, 12 Feb 2011 19:41:38 +0000 (19:41 +0000)
libs/web/htdocs/luci-static/resources/cbi.js
libs/web/luasrc/cbi/datatypes.lua

index d12d050a8ae8f084daafed7a13be6376bad91c1d..2bcfb8c3dfffc373e3e07d8f06c9c675eb2dbcd7 100644 (file)
@@ -141,7 +141,7 @@ var cbi_validators = {
        },
 
        'hostname': function(v)
-       {       if ( v.length <= 24 )
+       {       if ( v.length <= 253 )
                        return (v.match(/^[a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]$/) != null);
        },
 
index d1ac8f405a93c494359dd74eb3eefb531ed03898..58b54de6e6370b166b9c39421d35de8de923f82b 100644 (file)
@@ -127,7 +127,7 @@ function macaddr(val)
 end
 
 function hostname(val)
-       if val and (#val < 25) and val.match(val, "^[a-zA-Z0-9][a-zA-Z0-9%-%.]*[a-zA-Z0-9]$") then
+       if val and (#val < 254) and val.match(val, "^[a-zA-Z0-9][a-zA-Z0-9%-%.]*[a-zA-Z0-9]$") then
                return true
        end
        return false