From: Jo-Philipp Wich Date: Sat, 11 Apr 2020 16:34:54 +0000 (+0200) Subject: luci-mod-network: dhcp.js: allow lease hostname to be empty X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=57f27cf7f803cf1f788f6b3edb103c138aaa92f9;p=oweals%2Fluci.git luci-mod-network: dhcp.js: allow lease hostname to be empty Signed-off-by: Jo-Philipp Wich --- 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 6551b7273..fa991db41 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'));