Toolkit: add HostPort vtype
for easy checking textfield for a single host:port Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
a1d40d37ed
commit
5252b7f12b
@ -147,6 +147,14 @@ Ext.apply(Ext.form.field.VTypes, {
|
||||
},
|
||||
DnsOrIpText: gettext('Not a valid DNS name or IP address.'),
|
||||
|
||||
HostPort: function(v) {
|
||||
return Proxmox.Utils.HostPort_match.test(v) ||
|
||||
Proxmox.Utils.HostPortBrackets_match.test(v) ||
|
||||
Proxmox.Utils.IP6_dotnotation_match.test(v);
|
||||
},
|
||||
|
||||
HostPortText: gettext('Not a valid hosts'),
|
||||
|
||||
HostList: function(v) {
|
||||
let list = v.split(/[ ,;]+/);
|
||||
let i;
|
||||
|
Loading…
Reference in New Issue
Block a user