asaskevich / govalidator

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

IsDNSName invalidate string suffixed by dots #285

Closed orbli closed 5 years ago

orbli commented 6 years ago

Fix Issue https://github.com/asaskevich/govalidator/issues/284

asaskevich commented 6 years ago

Could you please review unit tests?

--- FAIL: TestIsDNSName (0.01s)
    validator_test.go:1727: Expected IsDNS("a.b.") to be true, got false
FAIL
FAIL    github.com/asaskevich/govalidator   0.451s
jesse-c commented 6 years ago

As I've commented on #284, this might not be an issue (just adding here so it's not missed). I'm not 100% sure what is suppose to be covered by DNSName, but a dot at the end of domains is valid.