|
|
@ -32,7 +32,7 @@ class HandleValidatorWithSuffix(validators.RegexValidator):
|
|
|
|
|
|
|
|
|
|
|
|
def IP46CIDRValidator(value):
|
|
|
|
def IP46CIDRValidator(value):
|
|
|
|
if not re.match(r"[0-9a-fA-F:.]+/[0-9]+", value):
|
|
|
|
if not re.match(r"[0-9a-fA-F:.]+/[0-9]+", value):
|
|
|
|
raise ValidationError("Address needs to be a subnet in the format of ip/cidr")
|
|
|
|
raise ValidationError("Address needs to be a subnet in the format of ip/prefix")
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
ipaddress.ip_network(value)
|
|
|
|
ipaddress.ip_network(value)
|
|
|
|