Skip to content

Might be a bug in the example custom-validation #29

@Tensorfengsheng1926

Description

@Tensorfengsheng1926

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions