Improve DNS validation regex doc

This commit is contained in:
Daniel 2022-12-07 16:13:02 +01:00
parent 15ff395d43
commit 362d98727b

View file

@ -18,7 +18,7 @@ var (
`\.` + // ending with a dot `\.` + // ending with a dot
`)*` + // end subdomain group, allow any number of subdomains `)*` + // end subdomain group, allow any number of subdomains
`(xn--)?` + // TLD idn prefix `(xn--)?` + // TLD idn prefix
`[a-z0-9_-]{1,63}` + // TLD main chunk with at least one character `[a-z0-9_-]{1,63}` + // TLD main chunk with at least one character (for custom ones)
`\.` + // ending with a dot `\.` + // ending with a dot
`$`, // match end `$`, // match end
) )