houseabsolute / Data-Validate-IP

IPv4 and IPv6 validation methods
https://metacpan.org/release/Data-Validate-IP/
Other
4 stars 1 forks source link

is_ipv6 fails for an IPv6 with trailing :: #10

Open vijishmv opened 7 years ago

vijishmv commented 7 years ago

I was trying to validate an IPv6 IP with a trailing :: . is_ipv6 doesn't consider this as a valid IP. I think the regex doesn't handle this kind of IPv6.

It works for 2a00:8a00:6000:40::C12 But fails for 2001:4888:205:7126:e0:120::

autarch commented 7 years ago

Hmm, I just added 2067:FA88:: and 2001:4888:205:7126:e0:120:: to the test suite and they passed. See 15a9e09c8722ff71de4773474368bf46aefe496c