Skip to content

Structure validation without using tags in definition #722

@maeglindeveloper

Description

@maeglindeveloper

Package version eg. v9, v10:

v10

Issue, Question or Enhancement:

Hi everyone,
I'm totally new on go-playground/validator.
Is it possible to validate a struct not using tag on each field ?
For instance:

type User struct {
	Email string
}

func (i *User) Validate() error {
	// HERE Use of validate.Struct( ....) or something else 
}

Thanks in advance 👍

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