From e4a8f07501f1bd2658df08b90b0b3157c1583c0c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 11 Apr 2020 18:34:54 +0200 Subject: [PATCH] luci-mod-network: dhcp.js: allow lease hostname to be empty Signed-off-by: Jo-Philipp Wich (cherry picked from commit 57f27cf7f803cf1f788f6b3edb103c138aaa92f9) --- .../htdocs/luci-static/resources/view/network/dhcp.js | 3 +++ 1 file changed, 3 insertions(+) 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 f58adc93a..6693dc0ea 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')); -- 2.25.1