Merge pull request #4053 from TDT-AG/pr/20200515-luci-base

luci-base: fix host validation function
This commit is contained in:
Florian Eckert 2020-05-19 14:06:07 +02:00 committed by GitHub
commit aac1a8d512
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -341,7 +341,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'));
},