Closed edoardottt closed 4 years ago
Maybe i didn't understood well the docs, but I think I encountered a weird thing.
On validate the URL 100.55.44.36ewretyt4r3wewd3, the method govalidator.IsURL() returns true
100.55.44.36ewretyt4r3wewd3
package main import ( "fmt" "github.com/asaskevich/govalidator" ) func main() { validURL := govalidator.IsURL("100.55.44.36ewretyt4r3wewd3") fmt.Println(validURL) }
The code (I think) should print false
false
Ok. Then I've understood ahah. That was only a URL validator, there are also Ipv4 and Ipv6 validators. Clearly 100.55.44.36ewretyt4r3wewd3 is a valid URL, but it isn't a valid Ip.
Bug Report
Summary
Maybe i didn't understood well the docs, but I think I encountered a weird thing.
Current behavior
On validate the URL
100.55.44.36ewretyt4r3wewd3
, the method govalidator.IsURL() returns trueHow to reproduce
Expected behavior
The code (I think) should print
false