summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--libs/web/htdocs/luci-static/resources/cbi.js2
-rw-r--r--libs/web/luasrc/cbi/datatypes.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js
index d12d050a8a..2bcfb8c3df 100644
--- a/libs/web/htdocs/luci-static/resources/cbi.js
+++ b/libs/web/htdocs/luci-static/resources/cbi.js
@@ -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);
},
diff --git a/libs/web/luasrc/cbi/datatypes.lua b/libs/web/luasrc/cbi/datatypes.lua
index d1ac8f405a..58b54de6e6 100644
--- a/libs/web/luasrc/cbi/datatypes.lua
+++ b/libs/web/luasrc/cbi/datatypes.lua
@@ -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