Overview The below library can be used to validate the range of an integer in a struct in Golang gopkg.in/go-playground/validator.v9 – https://pkg.go.dev/github.com/go-playground/validator For this tutorial, we will use the below employee struct…
Tag: validation
Validate the presence of the field in a struct in Go (Golang)
Overview In this tutorial, we will explore two libraries that can be used to validate the field of a struct in Golang. The two libraries are gopkg.in/go-playground/validator.v9 – https://pkg.go.dev/github.com/go-playground/validator github.com/asaskevich/govalidator – https://github.com/asaskevich/govalidator…