validate_ip
Verify an IP address's validity against strict IPv4 (RFC 791) and IPv6 (RFC 4291) standards, including syntax checks and version detection.
Instructions
USE THIS to verify an IP address before relying on it — do not assume a dotted or colon string is valid. Strictly checks IPv4 (RFC 791, rejects leading zeros / out-of-range octets) and IPv6 (RFC 4291, including '::' compression and embedded IPv4), and returns the version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes | The IPv4 or IPv6 address to validate. |