luci-0.10: Merge r6887

This commit is contained in:
Manuel Munz 2011-02-12 19:41:38 +00:00
parent 18074ab09c
commit a6f83e195d
2 changed files with 2 additions and 2 deletions

View file

@ -141,7 +141,7 @@ var cbi_validators = {
}, },
'hostname': function(v) '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); return (v.match(/^[a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]$/) != null);
}, },

View file

@ -127,7 +127,7 @@ function macaddr(val)
end end
function hostname(val) 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 return true
end end
return false return false