A validator to validate whether the given value is valid IPv6Address or not. :raises ValidationError: if value is invalid IPv6Address.
(value: Any)
| 131 | |
| 132 | |
| 133 | def validate_ipv6_address(value: Any) -> None: |
| 134 | """ |
| 135 | A validator to validate whether the given value is valid IPv6Address or not. |
| 136 | |
| 137 | :raises ValidationError: if value is invalid IPv6Address. |
| 138 | """ |
| 139 | try: |
| 140 | ipaddress.IPv6Address(value) |
| 141 | except ValueError: |
| 142 | raise ValidationError(f"'{value}' is not a valid IPv6 address.") |
| 143 | |
| 144 | |
| 145 | def validate_ipv46_address(value: Any) -> None: |
no test coverage detected
searching dependent graphs…