summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/validation.js
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-05-13 11:57:38 +0200
committerFlorian Eckert <fe@dev.tdt.de>2020-05-19 14:05:26 +0200
commitc8d24f04de577156236561131f3e4ea9620c46bd (patch)
tree2f03a9bc1bec6cafa6e93aa7b1208badcbc98a53 /modules/luci-base/htdocs/luci-static/resources/validation.js
parentda7c3d920274f50f9872103f9aa4cf2a283b3d11 (diff)
luci-base: fix host validation function
Allow only ipv4 or ipv6 addresses without IP mask. A host IP with mask does not make sense in this context. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/validation.js')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/validation.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/validation.js b/modules/luci-base/htdocs/luci-static/resources/validation.js
index eea837d64e..02d7dbc37f 100644
--- a/modules/luci-base/htdocs/luci-static/resources/validation.js
+++ b/modules/luci-base/htdocs/luci-static/resources/validation.js
@@ -337,7 +337,7 @@ var ValidatorFactory = baseclass.extend({
},
host: function(ipv4only) {
- return this.assert(this.apply('hostname') || this.apply(ipv4only == 1 ? 'ip4addr' : 'ipaddr'),
+ return this.assert(this.apply('hostname') || this.apply(ipv4only == 1 ? 'ip4addr' : 'ipaddr', null, ['nomask']),
_('valid hostname or IP address'));
},