asaskevich / govalidator

[Go] Package of validators and sanitizers for strings, numerics, slices and structs
MIT License
6.02k stars 556 forks source link

Correct DNS max lengths and disallow underscores in hostnames #302

Open jesse-c opened 6 years ago

jesse-c commented 6 years ago

Fixes #301.

Only allow domains of length <= 253, and hostnames of length <= 255. Also, don't allow underscores in hostnames. See comments for links to sources.

sergeyglazyrindev commented 2 years ago

Hello guys! I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back Link to my repo: create issue there and we'll discuss it.