colinhacks / zod

TypeScript-first schema validation with static type inference
https://zod.dev
MIT License
33.09k stars 1.15k forks source link

ipv6: case insensitive comparison #3681

Open nick-zh opened 1 month ago

nick-zh commented 1 month ago

I might be mistaken, but I think the ipv6 comparison is case sensitive. From what I can see on wiki:

The hexadecimal digits are always compared in case-insensitive manner, but IETF recommendations suggest the use of only lower case letters. For example, 2001:db8::1 is preferred over 2001:DB8::1;

Maybe a toLowerCase should be added? I just ran into an issue because i got an ip that was mixed case 😞