Closes #299 Fixes #306
@ -1494,6 +1494,10 @@ func isHostname(fl FieldLevel) bool {
func isFQDN(fl FieldLevel) bool {
val := fl.Field().String()
if val == "" {
return false
}
if val[len(val)-1] == '.' {
val = val[0 : len(val)-1]
@ -7189,6 +7189,7 @@ func TestFQDNValidation(t *testing.T) {
{"2001:cdba:0000:0000:0000:0000:3257:9652", false},
{"2001:cdba:0:0:0:0:3257:9652", false},
{"2001:cdba::3257:9652", false},
{"", false},
validate := New()