import socket


def ipv6(value):
    """Validate an IPv6 address"""
    try:
        socket.inet_pton(socket.AF_INET6, value)
        return value
    except socket.error:
        raise ValueError("{0} is not a valid ipv4 address".format(value))