add DnsOrIp vtype
this is useful for options that can be dns names or ips (e.g. ldap servers) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
f90c941bc6
commit
ba916e58a9
11
Toolkit.js
11
Toolkit.js
@ -108,6 +108,17 @@ Ext.apply(Ext.form.field.VTypes, {
|
|||||||
},
|
},
|
||||||
proxmoxMailText: gettext('Example') + ": user@example.com",
|
proxmoxMailText: gettext('Example') + ": user@example.com",
|
||||||
|
|
||||||
|
DnsOrIp: function(v) {
|
||||||
|
if (!Proxmox.Utils.DnsName_match.test(v) &&
|
||||||
|
!Proxmox.Utils.IP64_match.test(v))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
DnsOrIpText: gettext('Not a valid DNS name or IP Address.'),
|
||||||
|
|
||||||
HostList: function(v) {
|
HostList: function(v) {
|
||||||
var list = v.split(/[\ \,\;]+/);
|
var list = v.split(/[\ \,\;]+/);
|
||||||
var i;
|
var i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user