luci-base: add a strict flag to the hostname validator
authorJo-Philipp Wich <jo@mein.io>
Thu, 22 Mar 2018 08:49:52 +0000 (09:49 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Apr 2018 21:21:53 +0000 (23:21 +0200)
commit70ffbe65a0d9e8a77c9d3bafc34ddd260490c541
tree8f44dc5d7fb0f9c5caa361e2a5af94e6da20b97d
parent4024d4f2242a88a5e9fd18ed437b1c9fd13693f9
luci-base: add a strict flag to the hostname validator

Some applications, e.g. dnsmasq, do not allow hostnames starting with an
underscore, therefor extend the existing hostname datatype validator with
a `strict` which disallows a leading underscore.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/cbi.js
modules/luci-base/luasrc/cbi/datatypes.lua