-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Describe the bug
::2:3:4:5:6:7:8 is marked as an invalid IPv6 address. It should be marked as valid.
Examples
Tested code at https://runkit.com/embed/2beeyq38q1ya
var validator = require("validator")
validator.isIP('::2:3:4:5:6:7:8'); // Returns false, should be true
Additional context
Validator.js version: 13.5.2
Node.js version: 15.11.0
OS platform: Ubuntu
Some other reading in other projects and on the web confirms this should be a valid IPv6 address:
- Fix ipv6 address parsing with leading compressor dotnet/corefx#38654 (comment)
- https://gist.github.com/dfee/6ed3a4b05cfe7a6faf40a2102408d5d8#file-ip_regex-py-L19
- http://commons.apache.org/proper/commons-validator/xref-test/org/apache/commons/validator/routines/InetAddressValidatorTest.html#L197
If I find time to address it I can try to fix it, but am not sure when that will be. 🙂
