Changeset 6888
- Timestamp:
- 02/12/11 20:41:38 (2 years ago)
- Location:
- luci/branches/luci-0.10/libs/web
- Files:
-
- 2 modified
-
htdocs/luci-static/resources/cbi.js (modified) (1 diff)
-
luasrc/cbi/datatypes.lua (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
luci/branches/luci-0.10/libs/web/htdocs/luci-static/resources/cbi.js
r6873 r6888 142 142 143 143 'hostname': function(v) 144 { if ( v.length <= 2 4)144 { if ( v.length <= 253 ) 145 145 return (v.match(/^[a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]$/) != null); 146 146 }, -
luci/branches/luci-0.10/libs/web/luasrc/cbi/datatypes.lua
r6873 r6888 128 128 129 129 function hostname(val) 130 if val and (#val < 25 ) and val.match(val, "^[a-zA-Z0-9][a-zA-Z0-9%-%.]*[a-zA-Z0-9]$") then130 if val and (#val < 254) and val.match(val, "^[a-zA-Z0-9][a-zA-Z0-9%-%.]*[a-zA-Z0-9]$") then 131 131 return true 132 132 end
