Wrap IPv6 literals with brackets. Fixes #323.

I think we should require at least one `:` to avoid false positives

Maybe `/^[0-9a-f:]+:[0-9a-f:]*$/i`?