Validates whether the given input is a valid IPv6 CIDR.
The IPv6 CIDR to validate, which can be in string, object, or tuple format.
True if the input is a valid IPv6 CIDR; otherwise, false.
import { ipv6 } from 'cidr-block';ipv6.isValidCIDR("2001:db8::/32"); // trueipv6.isValidCIDR("2001:db8::/129"); // false (range out of bounds)ipv6.isValidCIDR({ address: "2001:db8::", range: 32 }); // trueipv6.isValidCIDR(["2001:db8::", 32]); // trueipv6.isValidCIDR("invalid/32"); // false Copy
import { ipv6 } from 'cidr-block';ipv6.isValidCIDR("2001:db8::/32"); // trueipv6.isValidCIDR("2001:db8::/129"); // false (range out of bounds)ipv6.isValidCIDR({ address: "2001:db8::", range: 32 }); // trueipv6.isValidCIDR(["2001:db8::", 32]); // trueipv6.isValidCIDR("invalid/32"); // false
Validates whether the given input is a valid IPv6 CIDR.