luci-mod-network: dhcp.js: allow lease hostname to be empty
[oweals/luci.git] / modules / luci-mod-network / htdocs / luci-static / resources / view / network / dhcp.js
index 6551b72731b5d8b0f304bdbb7c132b41dac9019f..fa991db41d6f85cf9fb225748381beb31c44b5e1 100644 (file)
@@ -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'));