Skip to main content

validate_ipv46_address

Validates that the provided value is either a valid IPv4 or IPv6 address, raising a ValidationError if it fails both checks.

def validate_ipv46_address(
value: string
) - > null

Validates that a value is either a valid IPv4 or IPv6 address.

Parameters

NameTypeDescription
valuestringThe IP address string to be validated against IPv4 and IPv6 protocols.

Returns

TypeDescription
nullNothing if the value is a valid IP address; otherwise, a ValidationError is raised.