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>
This commit is contained in:
parent
da7c3d9202
commit
c8d24f04de
1 changed files with 1 additions and 1 deletions
|
@ -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'));
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue