Open
Description
- I have looked at the documentation here first?
- I have looked at the examples provided that may showcase my question here?
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
cidrv4 validation does not detect invalid cidrv4 such as 172.56.1.0/16 (as can be verified here https://ipduh.com/ip/cidr/)
Code sample, to showcase or reproduce:
package main
import (
"fmt"
"github.com/go-playground/validator/v10"
)
func main() {
validate := validator.New()
cidr := "172.56.1.1/16"
err := validate.Var(cidr, "required,cidrv4")
if err != nil {
fmt.Println(err)
} else {
fmt.Println("Valid cidrv4")
}
}
Metadata
Metadata
Assignees
Labels
No labels