summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-11 18:34:54 +0200
committerJo-Philipp Wich <jo@mein.io>2020-04-11 18:34:54 +0200
commit57f27cf7f803cf1f788f6b3edb103c138aaa92f9 (patch)
treeeec3b86cfdda2f796a6b9dd2abf23e83504879e4
parent137db1c4d1bac4000f9c17150ac286b73787ce20 (diff)
luci-mod-network: dhcp.js: allow lease hostname to be empty
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
index 6551b72731..fa991db41d 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
@@ -66,6 +66,9 @@ CBILease6Status = form.DummyValue.extend({
});
function validateHostname(sid, s) {
+ if (s == null || s == '')
+ return true;
+
if (s.length > 256)
return _('Expecting: %s').format(_('valid hostname'));