> Op 27 oktober 2016 om 7:52 schreef Marc-Aurèle Brothier :
>
>
> From a quick look at the code you've forgotten one "|" for the or condition:
>
No, I didn't. Otherwise the test will always fail since either IPv4 or IPv6
will fail.
I think I got it now:
$.validator.addMethod("ipv46cidr", fu
>From a quick look at the code you've forgotten one "|" for the or condition:
$.validator.addMethod("ipv46cidr", function(value, element) {
if (!$.validator.methods.ipv4cidr.call(this, value, element) ||
!$.validator.methods.ipv6cidr.call(this, value, element))
return false;
retur
So my JS skills are way to low, but I tried this, but it doesn't seem to work:
$.validator.addMethod("ipv46cidr", function(value, element) {
if (!$.validator.methods.ipv4cidr.call(this, value, element) |
!$.validator.methods.ipv6cidr.call(this, value, element))
return false;
retu
Hi Wido,
Yes, you can add a new validator that can validator that the provided address
is either ipv4 or ipv6, here:
https://github.com/apache/cloudstack/blob/master/ui/scripts/sharedFunctions.js#L2327
Give the validator any appropriate name, and use it in the network.js code
replacing the c