Hi, in the example Custom validators,
(
|
if v, ok := binding.Validator.Engine().(*validator.Validate); ok { |
)
v, ok := binding.Validator.Engine().(*validator.Validate) returns v=nil and ok=false on my machine. Therefore the validator
bookableDate would not be registered.
Environment:
Windows 10
Go 1.13
github.com/gin-gonic/gin v1.5.0
github.com/go-playground/validator/v10 v10.2.0
Hi, in the example Custom validators,
(
examples/custom-validation/server.go
Line 32 in 3a0d22a
v, ok := binding.Validator.Engine().(*validator.Validate)returns v=nil and ok=false on my machine. Therefore the validatorbookableDatewould not be registered.Environment:
Windows 10
Go 1.13
github.com/gin-gonic/gin v1.5.0
github.com/go-playground/validator/v10 v10.2.0