Validates ipv4 and ipv6 formats.
Summary
Functions
Validates an IPv4 address in dotted-decimal notation.
Validates an IPv6 address using Erlang's :inet.parse_ipv6_address/1.
Functions
Validates an IPv4 address in dotted-decimal notation.
Rejects leading zeros (e.g., "01.02.03.04"), values > 255, and non-numeric characters. Uses pure binary pattern matching for maximum performance — no regex, no String.split, no String.to_integer.
Validates an IPv6 address using Erlang's :inet.parse_ipv6_address/1.
Rejects addresses containing a zone ID (%), which is not allowed
by the JSON Schema specification.